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

Add custom error display for platforms #2875

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

carstene1ns
Copy link
Member

@carstene1ns carstene1ns commented Dec 25, 2022

Implemented currently for 3DS and SDL2. Switch and Vita are possible,
however an Error report might be generated on Switch (bad, could get
send to big N) and for Vita one would need to match framebuffer format
and such when dealing with GXM for dialog display. This is not worth
currently, since we likely migrate away from vita2d library in the
future.
Go through platform teardown code. While this may not work for every
case (e.g. out of memory on Wii), this should be cleaner.

@carstene1ns carstene1ns added UX For issues affecting the user experience, such annoyances, counter-intuitive or ugly design 3DS labels Dec 25, 2022
@carstene1ns carstene1ns force-pushed the feature/error-close branch 2 times, most recently from 1ba3165 to 954bfb9 Compare December 25, 2022 23:57
@Ghabry
Copy link
Member

Ghabry commented Dec 26, 2022

Hm good idea with this function that must be defined per port.

This approach could be also used to reduce ifdefs in all these "get path for x" cases we have 🤔

@carstene1ns
Copy link
Member Author

Ideally it would be local to main() and be called with atexit(), however no idea how reliable this is for custom C libraries.

More platform abstraction is good, these paths could go through DisplayUI interface. IMO we should rename DisplayUI someday...

@fdelapena fdelapena added the Awaiting Rebase Pull requests with conflicting files due to former merge label Feb 24, 2023
@Ghabry
Copy link
Member

Ghabry commented Apr 21, 2023

This is incomplete but imo worth to be added to 0.8.0

Will rebase this next week (except if c1 wants to do it himself)

@Ghabry Ghabry added this to the 0.8.1 milestone Apr 29, 2023
@Ghabry Ghabry self-assigned this Apr 29, 2023
@Ghabry Ghabry modified the milestones: 0.8.2, 0.8.1 Mar 30, 2024
@carstene1ns carstene1ns mentioned this pull request Mar 30, 2024
@carstene1ns carstene1ns force-pushed the feature/error-close branch from 954bfb9 to 8eb1ff5 Compare March 30, 2024 22:45
@carstene1ns
Copy link
Member Author

carstene1ns commented Mar 30, 2024

Just rebased for now. I am still not sure, how to make this better.

error.mp4

@carstene1ns carstene1ns force-pushed the feature/error-close branch from 8eb1ff5 to b25c0ae Compare March 31, 2024 00:02
@Ghabry Ghabry removed the Awaiting Rebase Pull requests with conflicting files due to former merge label May 10, 2024
@carstene1ns carstene1ns force-pushed the feature/error-close branch from b25c0ae to 652c7b5 Compare May 25, 2024 22:39
@carstene1ns carstene1ns marked this pull request as ready for review May 25, 2024 22:41
@carstene1ns
Copy link
Member Author

Using atexit() now. This works at least for all dkP platforms nowadays and others do not have specific teardown code. This simplifies it a bit.
Vita should be tested maybe.

Implemented currently for 3DS and SDL2. Switch and Vita are possible,
however an Error report might be generated on Switch (bad, could get
send to big N) and for Vita one would need to match framebuffer format
and such when dealing with GXM for dialog display. This is not worth
currently, since we likely migrate away from vita2d library in the
future.
Go through platform teardown code. While this may not work for every
case (e.g. out of memory on Wii), this should be cleaner.
@carstene1ns carstene1ns force-pushed the feature/error-close branch from 652c7b5 to 0fb5083 Compare May 25, 2024 23:10
SDL_SetWindowFullscreen(sdl_window, 0);
SDL_SetWindowSize(sdl_window, 0, 0);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do a test to figure out what Wii/WiiU do when invoking this MessageBox code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is not implemented currently.
But this falls back to our generic message handler.

For wiiu we can add it natively (erreula applet).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay. ErrEula sounds useful :). Considering I'm actively working on Wii(U) currently I will merge this and fix any upcoming problems in the other PR(s).

@Ghabry Ghabry merged commit 69a20d7 into EasyRPG:master Jun 5, 2024
13 checks passed
@carstene1ns carstene1ns deleted the feature/error-close branch June 6, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3DS UX For issues affecting the user experience, such annoyances, counter-intuitive or ugly design
Development

Successfully merging this pull request may close these issues.

3 participants