Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MC...again #535

Merged
merged 2 commits into from
Sep 6, 2021
Merged

MC...again #535

merged 2 commits into from
Sep 6, 2021

Conversation

KrahJohlito
Copy link
Member

@KrahJohlito KrahJohlito commented Sep 4, 2021

Pull Request checklist

Note: these are not necessarily requirements

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • Requires update of the PS2SDK
  • Requires update of the gsKit
  • Others (please specify below)

Pull Request description

Fixes #527
ok that took way too long to notice.. in checkFile we were checking ret value of mkdir and upon success.. not continuing to call open, and for some reason.. writing the icons only works with openFile (its not setting permissions 0666 because I noticed and tried that also).. but this now works.. and @J013k s "weird thing" is fixed also :)

@KrahJohlito
Copy link
Member Author

@J013k if you don’t mind just checking to make sure it’s not writing the icon every time? Just in case the read only call needs to be openFile also.. maybe we can change the name of this function to be mcOpenFile or something if it needs to be used in all mc operations..?

@J013k
Copy link
Contributor

J013k commented Sep 4, 2021

The only way I can check if the icon for OPL is not being written over and over again...
Is by seeing creation\modification date in wLe:

  • When OPL folder has been created:
    https://i.postimg.cc/7LLjqsVy/Org-date.png

  • When I saved network and global settings:
    https://i.postimg.cc/dt1CmG4V/Mod-date.png

  • When I only changed network setting:
    https://i.postimg.cc/Nj8QKzm9/Mod-date-2.png

As for tests.
I only checked it on SCPH-75004.

  • OPL folder does not exist.
    When one MC is in the 1st\2nd slot or with 2 MC in both slots.
    Setting were always saved. All files have been created.

  • When there is empty OPL folder on both MC.
    Settings were saved to mc0:/.

  • When in OPL folder there are icon.sys and opl.icn settings will be saved to this directory.
    The icon files will not be overwritten.

  • When conf_network.cfg does not exist. After saving changes it will be created and these settings will be updated.

  • When conf_opl.cfg does not exist. After saving changes it will be created and the settings will be created.
    However OPL will not load conf_network.cfg if conf_opl.cfg does not exist.
    Also network settings will be default if you forgot to update them as well.

I can edit this post and make more tests after a few hours...

@KrahJohlito
Copy link
Member Author

KrahJohlito commented Sep 4, 2021

Seems fine mostly, thanks for test

However OPL will not load conf_network.cfg if conf_opl.cfg does not exist.

Can you check if this happens in 1.0.0 also please?

Also network settings will be default if you forgot to update them as well.

sorry I’m not sure what you mean here?

@J013k
Copy link
Contributor

J013k commented Sep 4, 2021

Also network settings will be default if you forgot to update them as well.

sorry I’m not sure what you mean here?

Once again sorry for my English... https://i.postimg.cc/7Y5KYgF5/szczerbaty.gif

If for example my conf_network.cfg looks like that:

ps2_ip_addr=192.168.0.10
ps2_netmask=255.255.255.0
ps2_gateway=192.168.0.1
ps2_dns=192.168.0.1
eth_linkmode=0
ps2_ip_use_dhcp=0
smb_share_use_nbns=0
smb_share_nb_addr=
smb_ip=192.168.0.2
smb_port=445
smb_share=PS2SMB
smb_user=GUEST
smb_pass=

https://i.postimg.cc/JhhtV4pc/settings.png

OPL will not load these settings if conf_opl.cfg does not exist.
Instead of it, it will load the default settings:

ps2_ip_addr=192.168.0.10
ps2_netmask=255.255.255.0
ps2_gateway=192.168.0.1
ps2_dns=192.168.0.1
eth_linkmode=0
ps2_ip_use_dhcp=1
smb_share_use_nbns=1
smb_share_nb_addr=
smb_ip=192.168.0.2
smb_port=445
smb_share=
smb_user=
smb_pass=

https://i.postimg.cc/pLh10DHD/sett2.png

You have to update them once again like they do not exist.
By update I mean e.g. type Share = PS2SMB or any other setting that you have to change.

After saving settings conf_opl.cfg will be created.
Now when you launch OPL all settings should be loaded.

However OPL will not load conf_network.cfg if conf_opl.cfg does not exist.

Can you check if this happens in 1.0.0 also please?

The same thing happens in OPL v1.0.0 so it not a regression.

BTW If you have any problems with understanding what I wrote, please point this out.

@KrahJohlito
Copy link
Member Author

Thank you for explanation, all good it made perfect sense.. sorry I thought they were two different points which is why I quoted separately. Cheers mate

@rickgaiser
Copy link
Member

Thanks for fixing and testing. Merging.

@rickgaiser rickgaiser merged commit 8fee912 into ps2homebrew:master Sep 6, 2021
@KrahJohlito KrahJohlito deleted the patch branch September 20, 2021 02:52
AKuHAK pushed a commit that referenced this pull request Sep 30, 2021
citronalco pushed a commit to citronalco/OPL-Daily-Builds that referenced this pull request Sep 10, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ISSUE]: OPL does not create conf_opl.cfg
3 participants