Open Ghabry opened 4 years ago
This only works when we get rid of the checks in system.h
and move everything in the build system. This header is used everywhere.
Most other uses are needed currently, only input_buttons_desktop.cpp
can be removed.
I would like to tackle this after removing autotools build and providing cmake only.
Now that we have a seperate main
startup sequence for everything this could be approached again.
The main
could instantiate a DisplayUi
and a PlatformHandler
(imo this should be splitted, think of Windows vs. Linux who both use SDL2 but completely different paths).
And then in PlatformHandler
all the functions can be implemented:
std::vector<std::string> GetRtpPaths();
std::vector<std::string> GetWildMidiPaths();
std::vector<std::string> GetFluidSynthSoundfonts();
Game_Clock& GetClock();
bool SupportJoystick();
bool SupportMouse();
bool SupportTouch();
bool SupportKeyboard()
// Todo: Input Buttons? They are DisplayUi specific though
Currently our code is "cluttered" (well, few lines) with different code paths for SDL and Libretro. By removing them from the main files it would become easy in CMake to build both an executable and the libretro library in the same step with only a small compile time penalty. Currently this would need an complete recompile twice, which takes too long.