Commit Graph

63 Commits

Author SHA1 Message Date
Lior Halphon 4527d9ee39 Styling fixes, fixed bugs caused by a rebellious brace, removed debug prints 2018-05-11 13:29:58 +03:00
Lior Halphon 9a29beb189 Merge commit '8f3fc1c2ade3c1c632cd3f3998ee26d2962e4dea'
# Conflicts:
#	SDL/main.c
2018-05-11 13:26:30 +03:00
Lior Halphon 6b6c25635a Merge commit '240730417774174315c2f7c148393834eb3297eb' 2018-05-11 13:11:53 +03:00
Lior Halphon bfc96abf8f Make save state names consistent across the Cocoa and SDL port 2018-05-11 12:51:15 +03:00
Lior Halphon feaa0d0654 Merge commit '7fe86cec59c1143275ffb7fc07b6716ae0116033' 2018-05-11 12:50:53 +03:00
Lothar Serra Mari 8f3fc1c2ad Fix check for SDL2 version 2018-04-22 16:20:11 +02:00
Lothar Serra Mari ca571c6fa5 SDL2: Update to SDL_OpenAudioDevice()
Instead of the legacy SDL_OpenAudio() method, we now use the newer
SDL_OpenAudioDevice() functions. This fixes audio in Windows if the SDL
version is 2.0.6 or higher.

It also allows us to use 48kHz audio for Windows (96kHz somewhat works
too, but since we don't get absolutely smooth audio with it, I'd stick
with 48kHz for now until we find a solution. 44.1Khz is available as
fallback for SDL 2.0.5 and lower. Yes, the 2.0.5 to 2.0.6 transition was
quite harsh in terms of Windows audio support...
2018-04-22 15:22:10 +02:00
Lothar Serra Mari 2407304177 SDL2: Write battery file information before issueing RESET_COMMAND
Before performing the GB reset, we should perform a GB_save_battery.

Otherwise, resetting the emulation will kill ("kill" as in simply don't
write them into the .sav) all changes made to the battery save since
sameboy was started.
2018-04-19 16:47:54 +02:00
Lothar Serra Mari 7fe86cec59 Fix savestates in SDL2 port
Because SDL_SCANCODE_0 comes *after* SDL_SCANCODE_9 in the SDL keycode
table, we have to check if the keycode is between >=1 and <=0. We also
have to substract SDL_SCANCODE_1 in order to set command_parameter
properly.

Errata: Currently, the savestate created with CTRL+0 is created, but
refuses to load on Windows (working fine on Linux).
2018-04-19 14:52:36 +02:00
Lothar Serra Mari 9343d8162d Add fullscreen mode for the SDL2 port 2018-04-18 19:22:08 +02:00
Lior Halphon 96063fb0da Fixed Windows build, added Unicode support in Windows. 2018-03-28 21:59:27 +03:00
Lior Halphon fd2e169dc9 Seems like the audio bug introduced in SDL 2.0.5 for macOS wasn’t fixed. 2018-03-27 23:05:08 +03:00
Panda Habert 980acc3fb8
Make the last option's purpose more explicit
I mistook it several times for the option to exit the menu :/
2018-02-26 02:27:50 +01:00
Lior Halphon d0202a3f9a Added LCD graphics filter; emulates low-resolution LCD artifacts 2018-02-17 20:43:48 +02:00
rootfather 8f56da465a SDL: Fix typo in the GUI 2018-02-03 16:35:50 +01:00
connor rigby ce31de47cb Fix loading game from command line. 2018-01-22 12:25:27 -08:00
Lior Halphon 5c16d0e656 Added model selection GUI in the SDL port. Closes #24 2018-01-13 13:49:20 +02:00
Lior Halphon 59d4cb4bc2 Make menu key more obvious on the SDL port 2018-01-13 13:02:07 +02:00
Lior Halphon 2205493862 Bug fixes in the SDL port 2017-12-30 17:07:05 +02:00
Lior Halphon d3a2e49d38 Merge branch 'sdl_gui' into libretro_core
# Conflicts:
#	Makefile
#	SDL/main.c
2017-12-29 13:12:12 +02:00
Lior Halphon 600f0eadd9 Better Windows and Linux compatibility 2017-12-29 13:06:38 +02:00
Lior Halphon 3d8e22ed50 Use SDL’s OpenGL headers 2017-12-29 11:35:09 +02:00
Lior Halphon b1edf540d8 Handle failures to create an OpenGL context better 2017-12-29 00:43:19 +02:00
Lior Halphon ca92c51f51 Save user configuration 2017-12-28 21:46:59 +02:00
Lior Halphon effc02ce8e Use SDL_GetBasePath for better portability 2017-12-28 20:29:15 +02:00
Lior Halphon 61f9dbd95d Use SDL’s key mapping when available 2017-12-28 20:22:54 +02:00
Lior Halphon c559a308ad Slightly improved background 2017-12-27 23:20:06 +02:00
Lior Halphon dc59fdf40e Highpass filter in SDL 2017-12-23 22:11:53 +02:00
Lior Halphon 3c1a805770 Frame blending 2017-12-23 22:11:53 +02:00
Lior Halphon d262dde71a Scaling filters in SDL 2017-12-23 22:11:53 +02:00
Lior Halphon c03ccba8db Basic Joypad support 2017-12-23 22:11:43 +02:00
Lior Halphon f48194f480 Added configurable controls 2017-12-22 22:25:53 +02:00
Lior Halphon 8e61098fec Use scan codes instead of key symbols 2017-10-14 20:24:13 +03:00
Lior Halphon 47d5b485d4 Better controls and visuals for settings 2017-10-14 17:08:52 +03:00
Lior Halphon 2dfe22e834 Added graphics options menu, fixed issues with exiting not saving battery in some cases 2017-10-14 14:10:26 +03:00
Lior Halphon c66e9a06cf Added basic menu 2017-10-14 01:41:51 +03:00
Lior Halphon bbd3b7e550 Got rid of -ICore 2017-10-13 00:02:02 +03:00
Lior Halphon 947c62bea9 Oops 2017-10-04 13:14:37 +03:00
Lior Halphon 9cc8b3320a Starting to add a GUI to the SDL port 2017-10-04 12:43:31 +03:00
Lior Halphon bbd2ca8ddf Fixed Linux compilation 2017-06-16 01:25:39 +03:00
Lior Halphon 1e228e1d9b Fixed a bug where the SDL port exited on “warning” logs when loading ROMs 2017-05-27 19:16:07 +03:00
Lior Halphon 6e7ab3558a Use a smaller audio buffer size if supported. 2017-05-27 12:29:36 +03:00
Lior Halphon ece1a11a23 SDL port: GUI-based error reporting, added help dialog (? on macOS, F1 on everything else) 2017-05-25 23:28:48 +03:00
Lior Halphon 4d5dc6a30e Cleanup 2017-05-24 21:44:43 +03:00
Lior Halphon 52e99adc32 SDL port: Resizing, resizing modes, and pause support 2017-05-24 20:33:39 +03:00
Lior Halphon 00439f4d49 SDL port: added drag and drop support, added model switch command, fixed macOS audio 2017-05-23 23:18:16 +03:00
Lior Halphon bef89c6604 Upgraded Sameboy-SDL to SDL2, fixed Windows build, fixed save states in SDL, added reset and mute to SDL. The SDL port now renders via OpenGL. 2017-05-21 21:45:19 +03:00
Lior Halphon 3feaeb153e New turbo related APIs, Quick Look no longer requires GB_INTERNAL 2017-04-19 21:55:58 +03:00
Lior Halphon a925ef130d Stabilizing API: New joypad, debugger and reset APIs; internal APIs and direct struct access are no longer available without defining GB_INTERNAL. The SDL port uses the new “public” APIs, as well as most of the non-debug Cocoa code. 2017-04-17 20:16:17 +03:00
Lior Halphon b0dfb8c5ac Added built-in IO-Register symbols 2017-02-20 14:37:15 +02:00