-
Notifications
You must be signed in to change notification settings - Fork 183
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
Libretro upstreaming #1464
Libretro upstreaming #1464
Conversation
…ing with the libretro system, but with the existing sdl one (No muting, pausing usw.)
c284aab
to
dfd618f
Compare
updated the readme with minimal instructions |
dfd618f
to
2a2b736
Compare
should be ready now. |
871a0b0
to
864838f
Compare
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.
Just had a quick glance, will look into this some more later.
#else | ||
# define Offset off_t | ||
# define EasyRPG_Offset off_t |
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.
This is very ugly (also the other type bending in filefinder for PSVita). I hope we can change this to use the same types later and get rid of all these Sce
stuff. The vitasdk should really abstract this away in their c library.
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.
should be done in one go with the AMIGA symbol mess :/
079663e
to
04f0582
Compare
…(For display refresh > 60 Hz)
…es instead of 735
This is for preventing a crash on Windows, when libretro passes nullptr but CommandLineToArgvW returns the real commandline.
Fix more whitespace issues
…ents all double frees. Minor comment and style changes.
d5d71f5
to
534fedc
Compare
return false; | ||
} | ||
|
||
extract_directory(parent_dir, game->path, sizeof(parent_dir)); |
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.
This crashes on Windows because path in game->path is not UTF-8. Don't tell me they use the local Codepage here m(
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.
Nevermind, the path is UTF-8 encoded but liblcf can't handle such paths on Windows. In the GameBrowser we work around this with "SetCurrentDirectory" but I have a proper solution for this in my VFS branch, so I won't fix this. This is only a problem for the filename of the main game folder (where liblcf must have access to).
This is also ready now. There were no new crashes or anything reported by libretro users. The Player still crashes on Android when closing but I blame RetroArch for this, even my start/stop simplification didn't help here. |
I have an idea how to fix the audio thread crashes on core shutdown on Windows and Android (these are RetroArch bugs because they call code in the unloaded dll/so) but I need to wait for there awesome buildbot infrastructure first before I can test it ^^' |
okay the workaround works, will only update libretro-common to the latest submodule version, then we are good to go. |
… Keyboard config -> Input, update submodule
73e4cd5
to
c09b4f8
Compare
…argc instead, otherwise this mismatches when e.g. libretro uses (nullptr, 0) and crashes. Remove dead code Fix memory leak, the Windows CLI was not deleted
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.
I do not really like it, but i guess i cannot defend Player anymore 🤐
I'm slowly annoyed by always rebasing this therefore I would like to finally upstream the libretro code.
The code is not very invasive, only adds required libretro_ui and _audio files and "USE_LIBRETRO" where needed.
CMake considerations:
The CMakeLists is sufficient to build a easyrpg_libretro.a/.so when you have all dependencies installed (I refuse to add dependency source code in the upstream repo), simply compile with
-DPLAYER_TARGET_PLATFORM="libretro" -DBUILD_SHARED_LIBS=ON
and you get a library that works with at least Linux RetroArch.The exception is libretro-common which I added as a submodule with an appropriate CMakeLists.txt.
I'm a bit surprised how simple it was to add a non-SDL2 build with not too many changes (also a nice base now for other platforms) as I didn't intended that use-case when writing the file...
Biggest changes to the CMake file is the new "PLAYER_TARGET_PLATFORM"
Almost everything else is just adding tabulators because code was moved into if() but this renders badly in the diff viewer :/.