Commit Graph

6940 Commits

Author SHA1 Message Date
Link Mauve 7e1b64ae1d Remove OSMesa support
Mesa has now removed OSMesa from its codebase, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33836

There is no reason to keep this any longer, especially since EGL can do
the same and more.
2025-06-24 03:41:13 +02:00
Link Mauve bf208df81f Fix MSVC build in _ShowGpu initializers
“A default member initializer is not allowed for a member of an
anonymous struct within a union.”
2025-06-24 03:39:26 +02:00
rogerman 472fe89165 Fix building for the Cocoa port. (Regression from commit 38f6313.) 2025-06-23 17:19:10 -07:00
rogerman a9e86e68be Partially revert commit ecd4c16. types.h has never assumed the presence of cstdint. Let's remove this dependency to ensure compatibility regardless of compiler. 2025-06-23 17:16:45 -07:00
Link Mauve 39bd7fac68 Fix some -Wreorder warnings
Use C++11 member initialization, to avoid having to pointlessly reorder
initializations in the constructor.
2025-06-24 01:59:09 +02:00
rogerman 36ad64c79b Revert "AsmJit: Remove unused/standard features"
This reverts commit 56a8801575.

Let’s avoid modifying our vendored libraries unless absolutely necessary.

Signed-off-by: rogerman <rogerman@users.noreply.github.com>
2025-06-23 16:45:10 -07:00
Link Mauve ff5113f5ac Remove executable bit from source files 2025-06-24 01:27:20 +02:00
Link Mauve 02f3c32974 GTK frontend: Remove OSX support
The cocoa frontend is apparently much better, and the GTK one obviously
hasn’t even been built on maxOS in years.
2025-06-24 00:55:04 +02:00
Link Mauve ecd4c1642c Simplify integer type aliases
Always alias them from cstdint, as all compilers should support them.
2025-06-24 00:50:49 +02:00
Link Mauve 56a8801575 AsmJit: Remove unused/standard features
The casts through union were undefined behaviour (memcpy() should be
used instead), but they were unused so nothing bad happened.

_min() and _max() could be replaced with std::min() and std::max(),
whereas maxValue() could be replaced with std::numeric_limits<T>::max().

Once we migrate to C++20, bitCount() could also be replaced with
std::popcount() from <bits>.
2025-06-23 23:50:50 +02:00
Link Mauve 38f63130e2 Use explicit std:: prefix
Using `using std::*` made me wonder whether these types and functions
were from std, libc symbols, or custom ones.
2025-06-23 23:15:23 +02:00
zeromus 96805d7c27 winport - fix mojibake bug in configured path usage (mainly screenshots, fixes #910) 2025-05-28 00:35:27 -04:00
zeromus cdb9acdc4d fflush after printing ideas and nocash messages 2025-05-11 17:42:07 -04:00
zeromus 48fcb850de winport: fiddle with stdio redirection buffering 2025-05-11 17:40:24 -04:00
Link Mauve 1754c1851b Remove unused automake files
No idea why it hadn’t been removed yet.
2025-05-10 15:02:00 +02:00
Link Mauve ca272488c2 Remove the last remnants of the glade frontend
This one has never been full-fledged, but was still referenced in the
autotools build system.
2025-05-10 13:54:39 +02:00
thesource 8a26c971f2 Make enum for joystick input type for convenience 2025-04-21 13:27:47 +02:00
thesource e706f0a4de Fix windows build 2025-04-21 13:27:47 +02:00
thesource d2627ffbe5 Fix coords on finger touch/lift 2025-04-21 13:27:47 +02:00
thesource 07c444eb0c Linux/GTK: add support for gamepad touchpad -> touch screen input
translation
2025-04-21 13:27:47 +02:00
rogerman 6f1a63fe89 Cocoa Port: Support Automatic Graphics Switching, allowing the use of the integrated GPU to run video display windows. (Requires a dual-GPU MacBook Pro with Metal-capable GPUs.)
- While this results in a 20% performance loss for video display window functions (like video filters), this also dramatically extends battery life. To return to the old way of using the discrete GPU for video display windows, the user must disable Automatic Graphics Switching in their System Preferences.
- The Troubleshooting Window now correctly reports the emulated 3D renderer that is currently active, rather than the one that is selected in the GUI.
- Also fix a bug where creating a OpenGL 3D renderer's context would immediately fall back to Apple Software Renderer if context creation failed. Now, context creation falls back to Apple Software Renderer as the last resort, only after all other Core Profile contexts have failed.
2025-03-26 16:55:25 -07:00
rogerman 25356b70f1 GPU: Add some more optimizations hints in CopyLineExpand() for SSSE3. 2025-03-26 13:26:42 -07:00
rogerman 75766495f9 Cocoa Port: Add some missing file references to the Xcode 3 project. 2025-03-20 22:55:40 -07:00
rogerman 1091e69726 Cocoa Port: Fix a bunch of bugs related to moving windows between Retina and non-Retina displays. (Related to commit 2bc5b0d.) 2025-03-19 03:11:16 -07:00
rogerman f6e0feb13e Cocoa Port: Report which OpenGL renderer is actually selected for 3D rendering. (Debug mode only.) 2025-03-18 15:55:01 -07:00
rogerman 33754b706e Cocoa Port: Add support for performing OpenGL 3D rendering on the 2013 Mac Pro's second GPU.
- For OpenGL 3D rendering, this yields a performance improvement of 2% - 4%.
2025-03-17 17:03:35 -07:00
rogerman 50e39989f7 GPU: Do some small optimizations to SSE2 and AVX2. 2025-03-16 23:15:46 -07:00
rogerman c73a7ffe53 GPU: Add NEON-accelerated functions for 2D layer compositing. (For 64-bit ARM CPUs only.)
- This improves GPU performance by up to 20% on the Raspberry Pi 5, and up to 50% on Apple Silicon CPUs.
2025-03-16 16:23:21 -07:00
rogerman e2379a66d6 matrix.h: Fix const-correctness for some *_fast function parameters.
- In practice, this only affected compiling for NEON on certain compilers. Other SIMD ISAs should remain unaffected.
2025-03-16 16:13:12 -07:00
zeromus 5cd9d36bba
Merge pull request #888 from Morilli/fix-movie-commands
fix movie command flags not actually being OR'd together
2025-02-14 03:16:42 -05:00
Morilli b756ffb1e6 fix movie command flags not actually being OR'd together 2025-02-14 08:57:30 +01:00
zeromus bec2329653
Merge pull request #886 from Anonym271/master
Bugfix: MemROMReaderWrite not working for size=1
2025-02-11 16:55:35 -05:00
Anonym271 06bef8b560 Bugfix: MemROMReaderWrite was not working for 1 byte length because it
would copy the current mem's byte into the source buffer instead of the
opposite way.
2025-02-11 22:49:20 +01:00
rofl0r dfcd482933 fix couple of header names to work on case-sensitive file systems 2024-12-06 02:37:38 +01:00
rofl0r 8a4fd0a9cb arm_jit: fix build when LOG_JIT_LEVEL != 0 2024-12-06 02:37:38 +01:00
zeromus b022181a05
Merge pull request #867 from lifehackerhansol/libnds-v2
Minor fixes for libnds v2.0.0 release
2024-11-14 23:54:53 -05:00
lifehackerhansol ee39a36f20
cp15: add support for process ID 2024-11-14 20:47:47 -08:00
lifehackerhansol c1624b2b33
MMU: support 8-bit write to REG_IPCSYNC 2024-11-14 20:47:47 -08:00
Max Fedotov 1192bf6f2c
EGL: use eglGetPlatformDisplay if available (#865)
POSIX Ports: When acquiring an EGL context, try calling the client-specific eglGetPlatformDisplay() before falling back to the more generic eglGetDisplay(). Hopefully fixes #864.
2024-11-12 22:50:35 -08:00
thesource 2c7fac57ff port 0.5 GPU scaling increments/window sizes to GTK3 2024-11-06 22:43:22 +01:00
Max Fedotov 3b1989a9d9
GTK*: add gamepad hotplug support (#855)
* add gamepad hotplug support
* Get rid of nbr_joy
2024-11-04 19:32:07 +01:00
zeromus f51e19b19b
Merge pull request #860 from En-En-Code/oglgetdriverversion-fix
fix: null-terminate versionSubstring in OGLGetDriverVersion
2024-11-02 22:24:35 -04:00
En-En 6f1d4e1d5c fix: null-terminate versionSubstring in OGLGetDriverVersion 2024-11-02 18:09:49 +00:00
rogerman 6690a8cedd posix: Update the Code::Blocks project file to include the new files that commit efdd938 added. 2024-10-28 14:39:17 -07:00
rofl0r 7d6f0982c8 gtk2: add some more presets to winsize menu 2024-10-28 19:16:45 +00:00
rofl0r 0ec9d74c39 gtk2: allow 0.5 increments on gpu scale
since the window size menu offers those as presets, and at least a 0.5
fraction on the scale doesn't seem to cause any problems in my testing.
2024-10-28 19:14:08 +00:00
rofl0r 76a6935dc8 gtk2: backport GPU scaling feature
feature was originally added via PR #764 to the gtk3 frontend.

this makes it possible to run the scaling on the GPU, avoiding the
incredibly slow software scaling that's otherwise done via cairo
when view->window size is set to anything > 1.0.
note that the window size "scale" needs to be identical to the
chosen GPU scale factor, otherwise software scaling kicks in again.

unlike the scale setting in the CLI port, which simply upscales the
native NDS framebuffer in hardware, this setting scales up even
the actual 3D textures, resulting in a sharper image, at the cost
of higher CPU/GPU usage. a game using demanding 3D scenes, like
zelda phantom hourglass' intro scene, may be able to still trash
the FPS.

the original PR also reported issues when setting the GPU scale to
a fraction, therefore the increments are currently locked to 1.0.
2024-10-28 13:50:27 +01:00
rofl0r 3ddb2669a9 cli: fix boost input detection
until now, the boost key was hardcoded to 'o' even when the config
said otherwise, and not treated in case of a joypad at all.
when triggered with the o key, it even behaved differently than
the gtk ui - the boost wasn't released together with the key,
but only when pressed again, so it was more like a shortcut for
"disable fps limiter".

this change implements the desired outcome of the second part of PR #822,
but without introducing more hacks and relying on magic values.

closes #822
2024-10-28 11:32:43 +01:00
rofl0r 58bbe693e1 cli: fix joypad and keyboard config retrieval
because the GTK frontends use GDK keysyms, not SDL ones, - the former
are being stored in the config file and used by the GTK ui) -  a temporary
workaround was put into place 14 years ago: the loaded config values
were simply being overwritten with the hardcoded defaults.

this commit removes the overriding of the config, and introduces
a cli frontend specific section "SDLKEYS", which is written by the
GTK2 frontend upon a configuration change.
it tries to convert the GDK keycodes into SDL2 ones while doing so.

an alternative solution (involving less code changes) would have been
to do the conversion in the cli frontend, but that would require having
the gdk header available for compilation, which may not be the case
if the user only wants the cli frontend. such a user could now create
the config file on another machine with the GTK frontend, or simply
manually take the desired values from the SDL_keycode.h header.

this change is instigated by one of the changes in PR #822, which simply
removed the workaround and kept parsing on error, which mitigated the
problem for some keys, but not all.
2024-10-28 11:32:43 +01:00
rofl0r 0a36e96f66
Merge pull request #845 from thesourcehim/master
[GTK*] Some gamepad input rework

- Unbind gamepad keys by default. The default bindings may fit one gamepad model but work weirdly with another causing issues like [LINUX/GTK3] Whitescreen freeze when pressing square on ds4 #834
- Use non-blocking method to obtain gamepad keys/axes during configuration to avoid visible emulator freeze and possible deadlock (see [linux] editing controlls sometimes (often) freezes the emulator #843)

closes #834
closes #843
2024-10-27 11:51:24 +01:00