Commit graph

86 commits

Author SHA1 Message Date
刘皓
f162e8a494
Replace xxd with a custom executable
This removes the need to have xxd installed and provides a portable way
to specify the name of the output array (xxd has an `-n` option for
this, but it isn't present in older versions of xxd), which helps reduce
the possibility of symbol conflicts in libretro builds and also prevents
portability issues since the name of xxd's output array depends on the
relative path to the input file, which can break if Meson changes the
structure of the build directory or if the user sets the build directory
to a different location.

Also, this custom executable declares the array as const so that it goes
into the read-only data section of the binary instead of the data
section.
2025-02-27 22:55:22 -05:00
Wayward Heart
99ad4fa636 Throw exceptions for Resets and Exits instead of directly raising.
While this does close small memory leaks, this is mostly for threading reasons. We're not supposed to call rb_raise with the gvl released, and calling rb_raise prevents GFX_UNLOCK from being called, which would cause problems for any games that want to call graphical operations in multiple threads should the user reset.

We're also now calling Graphics.__reset__ and Audio.__reset__ via eval instead of directly calling the functions, in case a game wants to hook them.
2024-08-02 09:26:51 -05:00
Wayward Heart
21fac5a946 Autohide mouse cursor after half a second 2023-10-17 04:38:05 -05:00
Splendide Imaginarius
ad3ddb7f8d
Merge pull request #34 from Splendide-Imaginarius/mkxp-z-eventthread-segfault
Fix segfault when opening settings menu
2023-10-15 12:16:12 +00:00
Splendide Imaginarius
8943c8e62c
Merge pull request #8 from Splendide-Imaginarius/mkxp-z-show-fps
Add "displayFPS" config option
2023-10-15 11:53:17 +00:00
Splendide Imaginarius
4b4f7b524e Fix segfault when opening settings menu
Ported from:
3c031aa2a8
2023-10-09 23:23:06 +00:00
Amaryllis Kulla
fae7fa9c4e
Update ancurio's copyright notice (#29) 2023-10-04 15:07:34 -04:00
Splendide Imaginarius
23451fb6c0 Add "displayFPS" config option 2022-12-12 05:11:31 +00:00
Snowdream
58de823d41 Move rqWindowAdjust.set() to EventThread 2022-07-24 03:50:06 -04:00
Struma
d568423774 Allow disabling the F1 menu through mkxp.json 2022-07-04 13:06:35 -04:00
Struma
158c988399 Make macOS happy. 2022-07-04 06:22:07 -04:00
Struma
f839001be9 Finish moving to GameController API, other stuff
Namely:
- moved raw input states from System to Input
- Input.raw_key_states returns Array<Boolean> now
- the Joystick hash has become an entire module
- added manual input handling for controller buttons
- Raw controller states for both buttons and axes can be polled
- mouse and raw keys are now captured between Input updates
2022-07-04 04:53:52 -04:00
Struma
5f4b644bd0 switch to a (mostly) functioning GameController API 2022-07-03 21:36:48 -04:00
Struma
342f30069f Add Mouse4, Mouse5 and scroll wheel bindings 2022-07-03 11:53:40 -04:00
Struma
2fb6510fd5 prevent launching with text input already enabled 2022-01-23 08:37:17 -05:00
Struma
683b5af87e Prevent crashes when closing the window during video playback 2022-01-23 04:03:50 -05:00
Struma
cb270888ba add Touch Bar support 2022-01-14 10:33:43 -05:00
Struma
35d776abd7 Make sure joysticks connected at startup are detectable by ruby 2021-08-21 03:52:50 -04:00
Struma
84c4f97c6c Add more detailed platform detection 2021-05-23 21:40:48 -04:00
Struma
f1f5f99133 Have window resizing functions properly wait on each other 2021-05-21 17:13:53 -04:00
Struma
4f6506e006 Do not wrap message box text on macOS
The sheet does this anyway, so there is no need to.
2021-03-16 06:31:42 -04:00
Joni Savolainen
c054b83178 Wrap text in message boxes 2021-03-14 15:12:26 +02:00
Struma
69a89cf87f sync thread access to text input buffer 2021-03-08 06:20:43 -05:00
Struma
1683483170 Make FPS counter a little more accurate 2021-03-01 01:51:15 -05:00
Struma
653eb0118b Remove haptic code 2021-02-23 17:25:07 -05:00
Struma
40ed422c3d fully functional Cocoa keybinding menu 2021-02-17 20:15:04 -05:00
Struma
0179e6a75b Revert "Remove haptics code"
Some part of this completely breaks the frame limiter.
I do not know which part
2020-12-25 19:41:16 -05:00
Struma
d565650975 Remove haptics code
It never worked anyway, as far as anyone knew, and is probably
not a feature anyone particularly needs.
2020-12-25 12:01:41 -05:00
Struma
65fc1f3f50 Fix loading OGG files with updated SDL_Sound 2020-11-21 22:37:07 -05:00
Struma
7e21066a70 Experimental Xcode builds (dependencies included) 2020-11-19 03:56:35 -05:00
Inori
d63f9958a3 misc additions 2019-09-21 19:47:51 -04:00
Inori
5b8d9e0100 Stop running rumble effects if duration is 0 2019-09-20 17:58:23 -04:00
Inori
582eee853b Test controller rumble support 2019-09-19 01:33:04 -04:00
Inori
4e7e7b740a Add MKXP.show_settings 2019-09-17 01:42:50 -04:00
Inori
939c601aea Add Input.joystick 2019-09-16 23:10:46 -04:00
Inori
8ed09b5d40 Limit size of waiting Input.gets text 2019-09-06 16:32:03 -04:00
Inori
ac28861587 Add text input functionality to Input module 2019-09-05 23:57:10 -04:00
Inori
6b007ed8d9 Implement Graphics.center 2019-08-31 12:55:03 -04:00
Inori
6f2a9d66cb Rename window from event thread 2019-08-31 01:41:04 -04:00
Inori
3c157daf34 Reposition window from event thread 2019-08-31 00:31:17 -04:00
Inori
141e06c7a0 Fix mouse visibility + coords with resized screen 2019-08-20 22:49:15 -04:00
Inori
b2b14abf2a Don't include alext.h when using Apple-provided OpenAL 2019-07-31 10:00:06 -04:00
Jonas Kulla
947974cac6 Config: Properly use windowTitle everywhere instead of game.title 2017-12-12 17:57:02 +01:00
Jonas Kulla
06feafe9ef Add missing include 2017-04-08 20:06:12 +02:00
Jonas Kulla
3ea24bd757 EventThread: Make system cursor visible over black aspect ratio bars
Should be less confusing for the player.
2017-04-08 18:45:24 +02:00
Jonas Kulla
47ef36ca19 EventThread: ifdef out broken SDL function on OSX 2016-02-24 17:55:28 +01:00
Jonas Kulla
de74fc1bc3 EventThread: Fix mouse cursor not being hidden 2016-02-24 17:45:55 +01:00
Jonas Kulla
7bf6eca362 EventThread: Comment out unneeded SDL2 constants 2015-07-26 23:56:50 +02:00
Jonas Kulla
e4bc08e972 Fix for old, broken OpenAL-Soft headers
See 4219b91bbb
2015-05-26 01:40:53 +02:00
Jonas Kulla
c92df0ce3a EventThread: Pause OpenAL device when entering background
This requires ALC_SOFT_pause_device to be present. It stops the
alc thread from needlessly consuming CPU resources.
2015-01-15 08:07:22 +01:00