Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Small fixes for Android and iOS #2261

Merged

Conversation

ivan-mogilko
Copy link
Contributor

@ivan-mogilko ivan-mogilko commented Dec 14, 2023

  • Use FindFile class when searching for translations;
  • Uniform DisplayAlert code.
  • Use our Path functions when getting parent path.
  • Add const to char* where makes sense.

Cannot test this on iOS myself.

On a side note, these likely could benefit from a MobilePlatform base class.

NOTE: not working on iOS atm, because the result is not returned to the ObjC side. This has to be fixed separately.
Use const char* where necessary, and use our Path functions instead of in-place algorithms.
@ivan-mogilko ivan-mogilko added system: android context: code fixing/improving existing code: refactor, optimise, tidy... system: ios labels Dec 14, 2023
@ericoporto
Copy link
Member

ericoporto commented Dec 14, 2023

these likely could benefit from a MobilePlatform base class

I guess if one is written, it could go here: https://github.com/adventuregamestudio/ags/blob/master/Engine/platform/base/mobile_base.h

I wonder if the Display Alert could be in base itself and then we just delete it from the other places - maybe not the Windows one. It may need the parent window passed there for the desktop platforms instead of the nullptr.

I will review it on iOS later.

@ericoporto
Copy link
Member

I verified this still works fine with the game! Here is an example of placing an empty game and having an error message appear, to demo the Display Alert

image

In a second run after removing the breakpoint

Screenshot 2023-12-15 at 22 00 01

@ivan-mogilko ivan-mogilko merged commit 2cd2771 into adventuregamestudio:master Dec 16, 2023
20 checks passed
@ivan-mogilko ivan-mogilko deleted the 361--iossafetyfixes branch December 16, 2023 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context: code fixing/improving existing code: refactor, optimise, tidy... system: android system: ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants