The advantage is that the menu entries are generated on demand, so they'll always be up to date irt language.
I think it would be better if the options_handler was in charge of showing the dialog too.
It would allow in-app menus and it will also avoid the careless unbounded copying.
But this first step preserves the previous behavior.
retro-go now always maintains the expected time a frame should take (time between ticks).
I've added `rg_system_set_tick_rate` to replace `app->tickrate = N` to ensure frameTime is recalculated when tickrate changes.
* Innitial commit
Localization for retro-go using a simple 0(n) lookup function called rg_gettext()
* adding language settings in options menu
* adding more gettext()
* new lookup function
* adding "For these changes to take effect you must restart your device." gui alert + fixing gettext() function
* modifying the gui dialog
* updating struct syntax
* update struct syntax (again)
* creating the python tool for localization
* updating tool + adding missing translations
* moving stuff to libs + starting writing readme
* adding missing "libs/localization" folder import in cmakelist + added the "fixme for rg_system"
* synthax adjust + moving back stuff from libs to retro-go
* removing trailing spaces
* adding the enum for language ids
* updating documentation according to the latest changes
* small tweaks
* Moved LOCALIZATION.md to the root folder
Whilst it is mostly relevant to libretro-go, it really is project-wide documentation.
* rg_localization: Got rid of the switch, made GUI dynamic
This makes adding a language more straightforward.
I kept the *msg *fr *en for now to avoid updating translations.h, but it could be replaced by the GCC extension as such:
[RG_LANG_EN] = "...",
[RG_LANG_FR] = "...",
So that adding a language is really just updating the enum...
* rg_localization: translations is const, we can use RG_COUNT
* rg_gui: Fixed language selection
* rg_localization: No need to validate rg_language in rg_gettext
It should always be valid, there's no need to validate it.
* rg_gui: Show language name in the log
* rg_localization: Got rid of the Translation struct
I am not 100% positive this is a good move...
Benefits:
- One less thing to change when adding a language
- Less code is always better
Cons:
- It doesn't make it clear what the "key" is (the english text)
- If in the future we need to add things like flags it will have to be returned to a struct
* updated python tool + updating translations
* added missing translations
* audio filter wrong translation
* fix : "a propose de retro-go"
---------
Co-authored-by: Alex Duchesne <ducalex007@gmail.com>
More apps might want to use wifi.
The file server remains in the launcher for now. But it could make sense to move it to retro-go at some point.
Big part of the new code in rg_gui is copy pasted from the launcher and needs some cleanup...
Having a built-in messaging system for all tasks is very convenient.
Tasks are free to ignore it or to use it to receive work units. There is no longer a need for separate queues!
This also allows tasks to receive and react to some standard messages like STOP/SHUTDOWN.
An additional benefit is that this will be very easy to make it work in SDL2 compared to full fledged queues. (I have already made a very unsafe and innefficient implementation to showcase, but it needs more SDL_Mutex/SDL_Cond...).
Added colors and also added a verbose mode that is stripped from release builds (so RG_LOGV calls can contain costly calculations that won't impact normal runtime)
Continuing with my attempt at not modifying fMSX directly, this intercepts the call and redirect to a file in retro-go's cache.
The cached file is created from our embedded copy of CARTS.SHA when not present.
The emulator source is unmodified but it is dynamically patched at compile time (by forcing an include file).
Both keyboard and joystick are emulated. For keyboard I looked up the most used keys in games. With feedback I'll be able to tweak that, but the virtual keyboard also works if other keys are needed.
Save states work through the in-game menu but not yet through retro-go's menu.
Launcher images are also missing.