Commit Graph

1741 Commits

Author SHA1 Message Date
Filippo Scognamiglio acb272ed78
Use ashmem instead of memfd_create on Android. (#816)
* Use ashmem instead of memfd_create on Android.

* Fix code styling issues.

* fix small mistake in merge commit

Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
2020-11-30 15:33:43 +01:00
WaluigiWare64 7da4550eea
Add support for macOS (#771)
* use shm_open() instead of memfd_create() on macOS

malloc.h isn't a header on macOS

* Change OpenGL headers + create ifdef for DO_PROCLIST

macOS seems to already have the OpenGL functions defined, without the ifdef, it gives "ambiguous references" errors.

* macOS doesn't have ->gregs in uc_mcontext

and it doesn't have REG_RIP either
https://github.com/gperftools/gperftools/blob/master/m4/pc_from_ucontext.m4

* use getpid() to make memory file name unique

* #ifndef __APPLE__ for AF_PACKET and linux/if_packet.h

* Add include and link directories for macOS and link the OpenGL framework

* Add macOS CI

* Use newly added libslirp package from Homebrew

https://github.com/Homebrew/homebrew-core/pull/63412

* Use Apple's Clang instead of GNU GCC on macOS

* Add macOS build instructions to README

* Try to fix macOS undefined symbol

* snprintf doesn't take null terminator into account

* Map new memory on macOS for JIT

* Only use gcc-ar if using GNU Compiler

* re-add fastmem code - whoops!

* Fix style issue - use camelCase not snake_case

* Set Minimum macOS version

* Switch Minimum OS X version to 10.9

* Add macOS libpcap library name

* fix memory leak

* Fix binding keys in macOS

* Allow getting MAC address on macOS

melonDS on Linux uses AF_PACKET, which doesn't exist on macOS. Instead, this commit uses AF_LINK on macOS to get the MAC address.

* Remove unneeded macOS CI dependencies

* Build melonDS app bundle on macOS

Now it is no longer required to install the libraries on macOS, they come with the app bundle.

* fix macOS CI not being able to find macdeployqt

* copy melonDS.app with recursive because it's a folder

* Disable fastmem checkbox on macOS

* Disable fastmem by default in config

* forgot a semicolon

* Don't bundle libraries, causes issues on macOS <10.15

* Update README + allow finding version in Finder on macOS

* Make sure fastmem checkbox stays uncheckable
2020-11-29 17:11:33 +01:00
Nadia Holmquist Pedersen 14be591ab8
Override CMAKE_AR/CMAKE_RANLIB, fixes flatpak builds, also use lld with clang if found (#828)
* Override CMAKE_AR/CMAKE_RANLIB, fixes flatpak builds, also use lld with clang if found

* Ensure we build with -fPIC/-pie for LTO builds
2020-11-28 17:12:44 +01:00
RSDuck 1ff4a1564f fix DSi mode with interpreter
I'm so stupid
2020-11-26 00:04:19 +01:00
Nadia Holmquist Pedersen ddf9a5ac27
CMake build fixups (#825)
* CMake build fixups

* Correctly set C/C++ standard
* Specify CXX in project() to get things set up right, also causes it to
link using the C++ compiler which is necessary for LTO builds with Clang
to work right
* Remove Fedora/flatpak build workaround, no longer needed with C++ standard set
* Link libm explicitly if we need to
* Specify -fuse-linker-plugin when building with LTO just in case

* Restore CMAKE_{C,CXX}_STANDRD, oops

* Use C++17
2020-11-23 21:57:36 +01:00
WaluigiWare64 f11d53c69c
Add radio buttons to switch between Direct and Indirect Mode (#822) 2020-11-22 15:31:29 +01:00
WaluigiWare64 a1cf1967ac
Fix fullscreen toggle with joysticks (#821) 2020-11-22 13:00:18 +01:00
RSDuck 50cdfd0137 fix edge indices count 2020-11-19 17:46:21 +01:00
RSDuck 690eed9e26 GPU2D: don't an indirect call in tight loops 2020-11-16 18:33:58 +01:00
RSDuck 842379c410 harmless DMA micro optimisation 2020-11-16 17:22:34 +01:00
RSDuck 1085cc14a4 prevent use after free 2020-11-16 17:03:24 +01:00
RSDuck 21dbca9543 use proper index buffers 2020-11-16 15:58:23 +01:00
Raphaël Zumer 550241dbad
Fix GBA file drag-and-drop when the system is off (#817) 2020-11-15 16:15:09 +01:00
RSDuck 05b94eff66 make audio output thread safe(r?) 2020-11-15 15:29:38 +01:00
Nadia Holmquist Pedersen 1b0a24a9bd
Fix LTO builds with Clang (#815) 2020-11-14 13:29:47 +01:00
RSDuck d697f9e0d2 make fastmem work again 2020-11-13 15:20:53 +01:00
WaluigiWare64 fbc7648d1a
Fix Ubuntu AArch64 CI - round 3 (#811) 2020-11-11 18:29:25 +01:00
RSDuck 62e3f41f20 delay savefile flush to the end of the frame 2020-11-11 13:38:05 +01:00
RSDuck 2720df9650 make platform objects typesafer and add mutex 2020-11-09 21:52:35 +01:00
RSDuck 052079afeb fix Windows 2020-11-09 20:56:31 +01:00
RSDuck ae9694ef8b do what Nadia said 2020-11-09 20:50:29 +01:00
RSDuck 78839f862e JIT fixes
- fix fastmem problems on linux
- small fix memory leak
- SlowWrite functions always take in a 32-bit variable so that the C compiler knows that the values aren't necessary zero extended
- a few other stylistic things
- handle SIGBUS as well (for macos)
2020-11-09 20:43:31 +01:00
Nadia Holmquist Pedersen ec232a9365
Fix building the Qt frontend with LTO (#802)
* Remove unnecessary -fno-pic/-no-pie, fixes LTO builds

* restore -no-pie because GNOME is derpy
2020-11-06 12:03:02 +01:00
RSDuck ad7791f726 better framelimiter for reference: https://github.com/citra-emu/citra/blob/master/src/core/perf_stats.cpp#L129 2020-11-02 20:13:22 +01:00
Filippo Scognamiglio fbca47381b
Fix a couple of wrong cpp function pointers. (#785) 2020-10-31 17:53:01 +01:00
Filippo Scognamiglio 45ea1fa990
Fix compilation issues on pedantic cpp compilers. (#783)
* Fix compilation issues on pedantic cpp compilers.

* Avoid using fullblown static function.
2020-10-31 17:40:05 +01:00
RSDuck 9ac60a840a SPU: work with scalars instead of arrays 2020-10-31 13:48:02 +01:00
WaluigiWare64 e46a408972
Remove unused gtk dependency from README (#788) 2020-10-30 21:42:09 +01:00
Arisotura 93664e7611
Merge pull request #798 from Hypnotron/master
Added 8/16-bit IPCFIFOSEND writes
2020-10-29 21:25:41 +01:00
Hypnotron 05e274a1f6 Added 8/16-bit IPCFIFOSEND writes 2020-10-29 16:09:25 -04:00
RSDuck c03d83b7be remove qt_sdl dependency from frontend util 2020-10-28 19:45:50 +01:00
Arisotura d2cd3eadbe fix to timers (ZXDS no longer runs slow as shit) 2020-10-27 05:03:17 +01:00
Arisotura 81964a0f89 make things function atleast somewhat
no pciture is being actually sent yet
2020-10-26 21:54:08 +01:00
Arisotura c0c1c2e1c2 camera: remember PLL config 2020-10-26 21:16:20 +01:00
Arisotura fc922ffb14 Merge branch 'master' into dsi_camera
# Conflicts:
#	src/DSi_I2C.cpp
2020-10-26 20:47:30 +01:00
Arisotura 49a96f41da I2C: silence logging for devices A0/E0 (mysterious alternate cameras) 2020-10-26 20:34:54 +01:00
Arisotura 2f15bcf93b betterer battery level 2020-10-26 17:55:25 +01:00
Arisotura af0a9e92c4 make unlaunch'd NANDs work 2020-10-25 18:25:09 +01:00
Arisotura 9fdc1de6fe add a few missing 32bit I/O accesses (IPC, SPI) 2020-10-25 18:14:40 +01:00
WaluigiWare64 8d70d0926c
Merge branch 'master' into feature/zip-support 2020-10-23 00:39:29 +01:00
WaluigiWare64 a8851a51f1 Switch to libarchive 2020-10-22 23:41:26 +01:00
RSDuck 65be1840f0 change JIT branch optimisations default to 1
branch linking is dead
2020-10-15 05:59:45 +02:00
Arisotura 3a17ae478e
Merge pull request #789 from abcdjdj/numpad-fix
Input : Treat numpad keys as keypresses
2020-10-13 13:49:23 +02:00
Madhav Kanbur dc46da0e24 Input : Treat numpad keys as keypresses
Typically, modifiers are masked out of keypresses to distinguish
between hotkeys and keypresses. This patch prevents the numpad
modifier from getting masked out in KeyPress() and KeyRelease().

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>
2020-10-13 11:02:58 +05:30
kyandora f8c4bf6db1
save microphone hotkeys (#781) 2020-10-07 01:33:11 +02:00
RSDuck ef4215e172 flush to file after importing SRAM 2020-10-06 00:49:16 +02:00
Valeri 0d845c9e69
Random minor fixes (#757)
* Fix incorrect/questionable assert() usage

Originally reported by https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2159000700,
but also includes a bunch of other fixes.

* Fix some `printf` warnings

Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2160310550

* Remove useless check

It is never passed thanks to `if (num_in < 1) {...; return}` before
Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2154840804

* Add missing header guard, rename other to avoid conflicts

Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2163210746

* Make DSi_SDDevice destructor virtual

Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2158670642

* Use thread-safe localtime_r, assign `time` result directly

Rule https://lgtm.com/projects/g/Arisotura/melonDS/?mode=tree&ruleFocus=2154840805

* Fix MinGW build

It needs _POSIX_THREAD_SAFE_FUNCTIONS to export `localtime_r`
2020-10-01 13:44:09 +02:00
RSDuck 9d5791f8e5 use fixed sized integers from stdint.h 2020-10-01 13:32:06 +02:00
RSDuck 6977302403 make OpenGL renderer a build option
mostly meant for the Switch port
2020-10-01 00:01:05 +02:00
WaluigiWare64 4b705556bc
Fix Ubuntu AArch64 CI - again (#767)
* Fix Ubuntu AArch64 CI - again

* Update build-ubuntu-aarch64.yml

* Update build-ubuntu-aarch64.yml

* Update build-ubuntu-aarch64.yml

* Update build-ubuntu-aarch64.yml

* Update build-ubuntu-aarch64.yml
2020-09-24 19:17:39 +02:00