-
Notifications
You must be signed in to change notification settings - Fork 189
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
WiiU Fixes #3234
WiiU Fixes #3234
Conversation
Support bundling a game for Wii U
Support shipped games Better CWD handling
warn if unsupported
This comment was marked as outdated.
This comment was marked as outdated.
woah that UDP logger is awesome. Makes my life much easier xD |
Your code terminates fine when using the exit option but exiting from the WiiU menu crashes in most cases :/ Haven't found a working solution yet. My ugly recursive call on exit is working in both cases |
The ProcUI API is very unstable and querying it crashes when a shutdown was requested. For more control use it directly.
Consider "/vol" a valid path
Shutting down works now properly in all three cases:
The only remaining problem is extremly slow opening of ZIP archives, likely some IO buffering issue. But is not a blocker for me. Had to replace these WHB wrapper functions with calls to ProcUI which is the low level API. SDL2 will not handle it when it is initialized before launching SDL2. (see code in wiiu_video.c) Problem is that you cannot query the ProcUI status after it was shutdown (calling the function will crash) so I needed more low level access to differentiate between "Home Menu used" and "Exit option selected (or Output::Error)". (This also makes btw it seems USB Keyboards are not initialized by SDL2/WUT, so cannot use it :( (used it to input the Wifi password before so should work in theory...) |
The ICU issue is a simple fix 🎊 🎊 🎊 The patch must be moved before https://github.com/EasyRPG/buildscripts/blob/master/wiiu/2_build_toolchain.sh#L45 |
The idea is to promote our charsets on the joypad screen, by letting a user search for their favorite character by looking while waiting... But I don't have a wii u to test how does it look like 🤔 Here's a psd containing editable assets: I recomend opening my psd files over the browser editor https://www.photopea.com/ |
…a single read Was the only agressive use of "end" in our code.
Implemented for the WiiU because IO through std::filebuf appears to be unbuffered. But can maybe help on other platforms. Can be toggled by setting USE_CUSTOM_FILE_READBUF to the prefered buffer size.
Somehow the buffering doesn't work and "pubsetbuf" does nothing (which is allowed by the standard xD) so I wrote my own buffering file IO. Verifying whether the filebuf implementation is correct is a bit tricky. I wrote a test code that does hundreds of random seeks using beg/cur/end mode and reads and compared the result with the normal fstream. Then executed it multiple times until I got no asserts anymore because of mismatches... |
With the upcoming audiocfg branch it will create "Soundfont" and "Font" folders on startup. Looks ugly when in the game directory as they are shown.
Thanks @jetrotal
I will enable this custom IO for the other homebrew targets. Only did an additional test on the Wii and this gives a huge loading time speedup. So likely also helps on Vita, 3DS and Switch. |
Is imo enough xD. Can start to bitrot now ;). At least some improvements (ZIP and buffer) will help other homebrew platforms, too. The pixel format was wrong (we know this issue ^^). Fixing this made the rendering significantly faster. Went in Yume Nikki from 22 FPS to 58 FPS in one map. Unterwegs in Düsterburg got +5-10 FPS. Also did some measuring and SDL2 render step takes around ~3-5ms. Decided to not implement ErrEula for now. This requires integration in the render loop so is not a simple fire-and-forget as the typical message box. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from a few nits, works really great now!
Fix WiiU texture copy by manually doing a format conversion.
Has the same performance issues
Addressed the review comments and fixed a few more minor bugs. Is ready now 👍 |
- ProdUi renamed - Fixed save path for bundled games - Moved ProcessProcUi call to the Ui
…hem with the swap abxy setting
Calling Player::Exit in the Ui can crash because the Ui is deleted by it. Also the normal teardown codepath is too slow on WiiU and crashes the console when the home button is used.
Still lacks polish like e.g. a nice banner but at least audio does not assert anymore and saving of the config works.
About this weird teardown in player.cpp (can we do better?)
SDL2 has a ProcUI handle which refers to the current application and for a proper shutdown of the app, SDL2 listens to PROCUI_STATUS_EXITING and then does some further cleanup.
When using the Exit menu item this will not trigger the cleanup automatically because SDL will not receive the shutdown event (but it receives it when using "WiiU Menu" in the home menu).
To make it receive the event I call
SYSLaunchMenu()
, then pump events once more (via that recursive call, SDL gets the quit event now) and then everything works...https://github.com/devkitPro/SDL/blob/7b058bd042a7c624c277aaddbca6fb2f6ae5233d/src/video/wiiu/SDL_wiiuvideo.c#L326-L338