In the SDL2 front end, the window is scaled to * 2 the game screen
resolution. Whilst this works find for raster games on normal DPI
monitors it doesn't work so well for :-
- raster games on HiDPI displays where the window appears too small.
- vector games where the window appears too big.
This change allows the user to specify a window scale at the command
line. It defaults to * 2 for backward compatibility with the old
version.
Full screen and window resizing via dragging is not affected by this
change.
We can now define input defaults for any player, any game, together with keyboard/joysticks mapping.
Macros are also supported.
Autofire supported and added a menu to set fire rate.
Also some code optimizations in startup and controllers config.
Fixed:
- image would not be centered when going from window mode to full screen;
- window would be bigger than screen when exiting full screen mode.
Also done some code cleanup (mainly avoiding repetitive if tests).
Fixed inputs always being reset to defaults (ignoring custom inputs from <romname>.ini).
Also fixed loading presets when <romname>.ini does not exist.
Note: -joy parameter will always ignore inputs from *.ini and set joystick inputs for all players.
If the -joy parameter is used when a game is launched for the first time, player 1 inputs will be set to joysticks and won't work without -joy after that, because without -joy the keyboard is assigned to player 1.
DIP switches menu working, similar to cheats menu, with check boxes and different color for changed DIPs.
Note: if we exit game with changed DIPs, those are saved in <romname>.ini and become the default values in future runs. Deleting <romname>.ini restores real default DIPs.
Also added a new option in ingame menu: Reset Game.
It is now possible to map joysticks buttons or remap game controllers buttons in ingame menu.
A file named gamecontrollerdb.txt is created in config folder (where fbneo.ini is) and loaded when fbneo starts.
It is possible to manually create or edit gamecontrollerdb.txt (for example, to change controller name).
Fixed UP and DOWN jumping two lines at once in games list when using DPAD.
Fixed controller not working when returning to games list after playing any game.
Improved games list and ingame menu navigation using game controllers / joysticks - LEFT/RIGHT jumps 10 lines; gamepad buttons can be used to filter games and other functions.
* SDL2: Add scrolling and dynamic title to ingame menu, plus correct aspect ratio
Some games have big list of cheats that won't fit on screen, so scrolling is needed.
Dynamic menu title helps navigation, particularly when going into sub menus.
Corrected aspect ratio of game screenshot shown in ingame menu.
Also, game screenshot is only shown in top menu, as it can make difficult to read menu's options.
* SDL2: enable cheats in ingame menu
Cheats menu is now populated and working in the ingame menu.
(conc.cpp) Also ignore carriage return chars when parsing cheats *.ini
* SDL2: fix SDL_Quit
- main.cpp: no more need BurnLibExit and SDL_Quit because always exit on "Bye" function called by aexit
- main.cpp: add SDL_INIT_GAMECONTROLLER
- vid_sdl2.cpp: clean and put printf into FBNEO_DEBUG
- clean and put printf into FBNEO_DEBUG
* SDL2: SDL_GameController enhanced
If use SDL_GameControllerOpen, need SDL_GameControllerClose