Commit Graph

248 Commits

Author SHA1 Message Date
RSDuck fdb6d226fd enable undo savestate load in the gui 2021-07-17 23:30:57 +02:00
WaluigiWare64 e5240a688c
Add ROM Header struct and ROM info dialog (#1095) 2021-07-02 16:42:54 +00:00
Arisotura 5b9f972625 UI: detect and save when window is maximized, and restore it as such. fixes #1135 2021-06-20 02:21:48 +02:00
cat 2494058a71
Add "frame step" hotkey and function (#1119) 2021-06-05 21:10:37 +02:00
Nadia Holmquist Pedersen af36d10023 Explicitly set NoRole on the setup cheats option so Qt on mac will stop stealing it 2021-06-05 14:47:51 +02:00
RSDuck e48e45db76 frontend: handle tablet and touch events
fixes #654 and #548
2021-05-24 20:23:06 +02:00
Raphaël Zumer eb7bedfc79
Remove outdated frontend solar sensor code (#1102) 2021-05-16 17:18:24 +02:00
Arisotura d3c298bbe4 ASSFUCKING STUPID SHITPILE.
fixes #1044

(also add separator for cleaner menu)
2021-05-06 00:33:50 +02:00
RSDuck eae42fb9f8 request repaint instead of update after each frame 2021-04-29 15:13:53 +02:00
Nadia Holmquist Pedersen cffffa887e macOS: Assign "Preferences..." to emu settings without also removing it from the config menu 2021-04-27 15:11:15 +02:00
Arisotura a2c12f7e66 fix some more case sensitive shito 2021-04-26 15:50:02 +02:00
Arisotura bf4052bc3d more of the same (actually fix the bug I was having) 2021-04-26 15:25:45 +02:00
Arisotura 1846a71265
Cart refactor (#1073)
complete cart-interface refactor, will make this code a lot easier to deal with
2021-04-25 00:48:02 +02:00
Nadia Holmquist Pedersen 06e2193c04 Fix up menu roles a bit 2021-04-19 09:18:50 +02:00
Arisotura 284a9b73b0 keep recent filenames from being absurdly long in the menu 2021-03-27 01:54:55 +01:00
RSDuck 436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
Nadia Holmquist Pedersen 97643586fa
Fix OpenGL display scaling on high DPI (#1011)
* Fix OpenGL display scaling on high DPI

* Scale the OSD too

* Fix indent
2021-02-22 18:17:48 +01:00
RSDuck 0aa0ae6c69 fix #1010 2021-02-22 02:38:21 +01:00
WaluigiWare64 712919ec41
Remove unneeded OpenGL loading function code (#1006) 2021-02-17 20:53:07 +00:00
RSDuck 64c6654d94 use syncs instead of glFinish 2021-02-16 15:00:23 +01:00
gal20 d63f7977f8
Remove code duplication in `onChangeScreenSize` (#968) 2021-02-09 23:42:31 +01:00
Wunk a7029aebae
Allow for a more modular renderer backends (#990)
* Draft GPU3D renderer modularization

* Update sources C++ standard to C++17

The top-level `CMakeLists.txt` is already using the C++17 standard.

* Move GLCompositor into class type

Some other misc fixes to push towards better modularity

* Make renderer-implementation types move-only

These types are going to be holding onto handles
of GPU-side resources and shouldn't ever be copied around.

* Fix OSX: Remove 'register' storage class specifier

`register` has been removed in C++17...
But this keyword hasn't done anything in years anyways.

OSX builds consider this "warning" an error and it
stops the whole build.

* Add RestartFrame to Renderer3D interface

* Move Accelerated property to Renderer3D interface

There are points in the code base where we do:
`renderer != 0` to know if we are feeding
an openGL renderer. Rather than that we can instead just have this be
a property of the renderer itself.
With this pattern a renderer can just say how it wants its data to come
in rather than have everyone know that they're talking to an OpenGL
renderer.

* Remove Accelerated flag from GPU

* Move 2D_Soft interface in separate header

Also make the current 2D engine an "owned" unique_ptr.

* Update alignment attribute to standard alignas

Uses standardized `alignas` rather than compiler-specific
attributes.

https://en.cppreference.com/w/cpp/language/alignas

* Fix Clang: alignas specifier

Alignment must be specified before the array to align the entire array.

https://en.cppreference.com/w/cpp/language/alignas

* Converted Renderer3D Accelerated to variable

This flag is checked a lot during scanline rasterization. So rather
than having an expensive vtable-lookup call during mainline rendering
code, it is now a public constant bool type that is written to only once
during Renderer3D initialization.
2021-02-09 23:38:51 +01:00
RSDuck 40aae154cf prevent race condition around framebuffers 2021-02-02 15:33:45 +01:00
WaluigiWare64 f9e701a719
Initialise cursor hiding timer before potential deletion of ScreenPanelGL 2021-01-29 16:05:51 +00:00
RSDuck a3f4aaf503 call glFlush only once
that seems to atleast get rid of the flicker
the weird issue that clears don't work is still there
2021-01-29 12:38:31 +01:00
Nadia Holmquist Pedersen b75b3f69b7
Don't save the window size to the config if in full screen (#933) 2021-01-27 00:14:24 +01:00
WaluigiWare64 ab222ab135
Use libepoxy to load in OpenGL functions (#960)
* Use libepoxy to load in OpenGL functions

Prevents having to load them in manually

* Install libepoxy in the CI

* Do not link OpenGL libraries, libepoxy opens them itself

* Add libepoxy to build instructions
2021-01-26 13:19:32 +00:00
gal20 54b1a752d4
Add hybrid layout (#772) 2021-01-25 19:47:54 +01:00
RSDuck b9a56bc4e4 more screen modes
- add support for different aspect ratios
- add support for displaying only one screen at once
2021-01-24 22:32:13 +01:00
WaluigiWare64 536902d610 Fix crash if OpenGL version is lower than requirements 2021-01-24 15:44:05 +00:00
WaluigiWare64 5dd94f5ec1 fix last commit 2021-01-22 17:38:30 +00:00
WaluigiWare64 faf7cf752d Add option to pause emulation when focus is lost
Fixes #875
2021-01-22 17:35:13 +00:00
Madhav Kanbur 1e4c0c9d72
Polish up archive support (#930)
* Fix directory path when extracting from archive

* Don't create new dir in execution dir of melonds
* Create it beside the archive instead

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* ArchiveUtil : Use QT functions for I/O

* Make it more platform independent, cleaner

* Fixes permission related crash on linux

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* NDSCart : Abstract out common code in LoadROM()

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Extract nds roms to memory

* Some stuff is still broken in the frontend

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* GBACart : Abstract out common code in LoadROM()

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Extract gba roms to memory

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Integrate archive support with recent files

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* onClickRecentFile : Pause emu thread conditionally

* Don't pause at start of the function
* If user opens an archive and hits cancel, it won't pause

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Handle Resets when loading from archives

* Ask user to pick the rom(s) again (i.e. GBA & NDS)
when there are multiple files in the archive(s)

* Directly load if only 1 file

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Archive support for drag-n-drop

* Also recent files support for drag-n-drop

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* main : Allocate rombuffer objects on stack

* Less messy, decreases chances of memory leaks

* Underlying implementation of qbytearray uses heap (hopefully?)

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* GetSavestateName : Archive support

* Construct ssname from srampath (since rompath has archive name)

NOTE: In general, archive name != rom file name !!!!!!!!!!

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Add srl and dsi as "direct-load" formats

* Direct-load = anything not in an archive

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Don't use static functions

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Remove QT stuff from Util_ROM

* Also, during reset, directly load file from archive (no rom picker)

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Remove QT includes from FrontendUtil.h

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Util_ROM/LoadROM() : Use SetupDSiNAND()

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Util_ROM/Reset() : Use strrchr()

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Util_ROM : Put Archive stuff behind ifdefs

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* main: Set parent widget for archive dialog boxes

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Revert "Util_ROM/Reset() : Use strrchr()"

This reverts commit c8af6f066f.
2021-01-22 11:22:32 +01:00
WaluigiWare64 bf0ea26596
Add option to hide mouse on inactivity (#955)
Also allow user to specify how long to wait before hiding
2021-01-21 19:48:25 +01:00
gal20 cd6859ef6f
Add hotkey to swap screens (#953) 2021-01-18 22:51:39 +01:00
RSDuck d529b650c0 implement swapping the position of both screens
closes #855
2021-01-17 22:16:32 +01:00
Ben Morris b402cb19b2
quit on sigint (#934)
* quit on sigint

* formatting
2021-01-10 03:48:40 +01:00
Arisotura 641ddf8137
Merge pull request #678 from WaluigiWare64/feature/zip-support
Add support for loading ROMs from a variety of compressed files
2021-01-07 18:30:12 +01:00
WaluigiWare64 e485ce3e13 Add Open ROM inside Archive function
instead of using file extensions
2021-01-07 17:26:55 +00:00
Madhav Kanbur 25455cb7aa
Set menubar height to 0 in fullscreen (#924)
* Set menubar height to 0 in fullscreen

* Avoid using hide() on the mainwindow's menubar as it breaks menubar
actions.

* Fixes save/load state shortcuts not working in fullscreen (#922)

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>

* Don't modify menubar width when exiting fullscreen

* Fixes weird looking menubar on Windows

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>
2021-01-05 11:37:27 +01:00
WaluigiWare64 9e15488e95
Fix mistake in merge commit 2021-01-03 16:00:50 +00:00
WaluigiWare64 83648f2d31
Merge branch 'master' into feature/zip-support 2021-01-03 15:53:23 +00:00
RSDuck cb58a422ac fix mac/clang build again 2021-01-02 19:58:49 +01:00
RSDuck e2c61b28e0 fix mac/clang build 2021-01-02 11:28:46 +01:00
RSDuck 18fe5c6759 prevent bleeding in screen texture
fixes #920
2021-01-02 08:55:48 +01:00
Madhav Kanbur 6adf1731c1 Add option to open recent files
* Remember last 10 roms in config
* Clear button for clearing list

Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>
2020-12-30 18:57:43 +05:30
Arisotura b00cd8bdee remove the hardcoded F11 debug key before I forget about it again 2020-12-24 01:46:13 +01:00
WaluigiWare64 df190b0400
Merge branch 'master' into feature/zip-support 2020-12-19 17:43:53 +00:00
Arisotura 1dbe69c6be remove some debug crap 2020-12-10 18:09:11 +01:00
RSDuck 9673659db4 fix toggle FPS hotkey 2020-12-07 17:00:53 +01:00
RSDuck 42e083960e always cap FPS to 1000 2020-12-04 00:00:35 +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 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
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
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 6977302403 make OpenGL renderer a build option
mostly meant for the Switch port
2020-10-01 00:01:05 +02:00
RSDuck f2fa52f26c add functionality to import savefiles 2020-09-11 03:08:06 +02:00
WaluigiWare64 ea640398f9
Add support for fullscreen hotkey (#748) 2020-09-06 22:59:35 +02:00
Arisotura b36b3feb7f support .dsi extension for dragdrop/cmdline launching 2020-08-24 21:25:10 +02:00
Arisotura f4427a89d0 disable savestate menu items in DSi mode 2020-08-24 20:13:58 +02:00
Arisotura e7025abcdc * fix build error
* make betterer polygon splitting an option
* add GL_LEQUAL depth test for 'equal' mode, might help
2020-08-24 19:32:07 +02:00
Arisotura abccc44eec make MAC randomization optional 2020-08-24 19:19:41 +02:00
Arisotura f8d1d08e9c (finally) build the goddamn cheat interface 2020-08-15 00:14:05 +02:00
Arisotura 0bd53a34ef lay base for the actual dialog
also make EmuSettingsDialog properly modal
2020-08-11 17:38:29 +02:00
WaluigiWare64 6d71f9c832
Merge branch 'master' into feature/zip-support 2020-08-05 15:06:15 +01:00
Arisotura c5ecef7410 fix similar bug with emu settings dialog
also make the reset-warning dialog a bit betterer
2020-07-31 20:51:16 +02:00
Arisotura d21cd20290 fix some pause bugs 2020-07-31 20:45:30 +02:00
Nadia Holmquist Pedersen b4ad35948d Merge remote-tracking branch 'upstream/slirp' into slirp-merge 2020-07-26 21:41:09 +02:00
WaluigiWare64 c351e777b4
part 2 of fix Linux invalid encoding 2020-07-24 18:25:07 +01:00
WaluigiWare64 a5d9f69127
Fix Linux "invalid encoding" filename 2020-07-24 18:19:02 +01:00
WaluigiWare64 7937406af6
Change binary stream to u8 and cast to char* 2020-07-22 16:39:24 +01:00
WaluigiWare64 7fb67570e9
fix 2020-07-22 16:17:32 +01:00
WaluigiWare64 c8e934ce97
Fix indentation + delete contents 2020-07-22 16:01:18 +01:00
U-RAYYAN-PC\Rayyan 96e0e37156 Link it up to onOpenFile() 2020-07-22 15:15:56 +01:00
U-RAYYAN-PC\Rayyan 0009a3ffd1 Add the extractROM function 2020-07-22 15:13:14 +01:00
RSDuck 778623a8b7 make linux work and fix a few bugs 2020-07-04 18:58:00 +02:00
RSDuck c5381d2911 reconcile DSi and JIT, fastmem for x64 and Windows 2020-06-30 23:50:41 +02:00
Arisotura fc5eedc716 * take nwifi forward some
* shut up CP15 printf's for Fx0
* fix bugs
2020-06-15 13:39:33 +02:00
Arisotura 200c494a55 get this little experiment started
for now all it does is crash
2020-06-04 15:15:09 +02:00
Arisotura d862b5869f allow .dsi files 2020-06-02 00:30:04 +02:00
Arisotura 43e045357f make it able to switch between DS and DSi modes 2020-06-01 20:36:30 +02:00
Arisotura d7b846619b add DSi-mode settings 2020-06-01 19:11:44 +02:00
Arisotura c45068da0e embed romlist.bin 2020-05-30 00:28:21 +02:00
Arisotura 88823f66cb * fix the OpenGL shito under Linux
* make the 'BIOS not found' errors a bit more user-friendly
2020-05-29 22:18:21 +02:00
Arisotura 8ddd82ca2c I'm a derp 2020-05-29 21:35:06 +02:00
Arisotura 9557e18b7c fart around 2020-05-29 21:27:40 +02:00
Arisotura a38b20484d finish the wifi dialog
also guess who the idiot is who forgot to add their files
2020-05-28 23:12:21 +02:00
Arisotura 590ab2ac2b fix things 2020-05-28 22:37:37 +02:00
Arisotura a2004785a4 re-add all old OSD messages 2020-05-28 18:22:02 +02:00
Arisotura 79d4183ccd re-add OSD system 2020-05-28 18:11:41 +02:00
Arisotura 2912a07b8b fix bugs, clean up some of the shit 2020-05-28 17:00:25 +02:00
Arisotura f7e53c6f71 so you can't resize() before show()ing?? bullshit. 2020-05-28 15:58:18 +02:00
Arisotura 0804ab3c78 * rework GPU's settings interface, make it config-agnostic
* make video settings dialog functional, sorta
* fix dialogs that were resizable
2020-05-28 15:53:32 +02:00
Arisotura 695839bb0e lay base for video settings dialog 2020-05-28 12:32:50 +02:00
Arisotura 0a68eb7803 make it hiDPI compliant (I hope)
also misc tweaks
2020-05-28 11:52:12 +02:00
Arisotura e8849db78a we don't need a GLShim.
blarg.

I don't understand this anymore.
2020-05-27 21:40:02 +02:00
Arisotura ef2802ae31 * use GL shim window instead of offscreen surface
* disable vsync by default (we'll take care of it later)
2020-05-27 21:29:47 +02:00
Arisotura 36f4cdbbbf get the OpenGL renderer going.
sorta.

(also make the blackmagic_II branch obsolete in the process)
2020-05-25 18:25:50 +02:00
Arisotura 10f9eda58a get the whole OpenGL shit going 2020-05-25 14:59:26 +02:00
Arisotura 4e34359a80 get the GL shit going 2020-05-25 03:12:09 +02:00
Arisotura bc4a83abca make frontend-util audio module config-agnostic 2020-05-24 23:47:11 +02:00
Arisotura 16252a85e7 separate screen handling shit to a specialized class 2020-05-24 23:16:56 +02:00
Arisotura f69f3fcb7a * safer window update
* only do auto screen sizing if needed
2020-05-22 13:54:29 +02:00
Arisotura 5dcf57e86d add screen filtering 2020-05-21 18:49:34 +02:00
Arisotura 8f9369beeb add screen layout system 2020-05-21 18:43:07 +02:00
Arisotura 108647e033 * add audio settings dialog
* attempt at betterer mic noise that doesn't work worth a damn
2020-05-21 01:39:41 +02:00
Arisotura 9e43c85b4d hook up microphone shit.
I did my best.
2020-05-20 23:55:18 +02:00
Arisotura a9b275bc25 reimplement Stop 2020-05-20 22:58:04 +02:00
Arisotura 2ebb21ce3b hook up pause and reset, w/ relevant hotkeys 2020-05-20 22:22:22 +02:00
Arisotura 26dcc95c20 do the easy menus 2020-05-20 21:23:15 +02:00
Arisotura d761db0056 populate the menus with the config data 2020-05-20 21:19:04 +02:00
Arisotura 7be662b2dd finish fleshing out the menus 2020-05-20 20:57:12 +02:00
Arisotura 700b1a8b9d add window icon 2020-05-20 03:01:09 +02:00
Arisotura 5ed87a634a add drag-drop support 2020-05-20 02:36:48 +02:00
Arisotura 4dae6d8928 load shit from command line 2020-05-20 01:49:40 +02:00
Arisotura a2f9472e5d might help fix crashes on exit? 2020-05-20 01:11:57 +02:00
Arisotura 68a7865096 basic touchscreen support 2020-05-19 22:57:15 +02:00
Arisotura 95f9698077 add back some hotkeys.
remove some legacy cruft from NDS.cpp.
2020-05-19 22:37:48 +02:00
Arisotura b262313816 actually hook up input to the core
also unbotch CMakeLists.txt
2020-05-19 22:22:21 +02:00
Arisotura 9df8d91bdc keep the ugliness confined in Platform.cpp 2020-05-19 21:34:24 +02:00
Arisotura 34506ff2bb actually complete the input config dialog 2020-05-19 20:48:52 +02:00
StapleButter 9fbf9b997b this might be a good idea 2020-05-19 13:28:46 +02:00
StapleButter 7d69699d64 fix Linux build error 2020-05-19 14:37:54 +02:00
Arisotura 7026bb15f6 input dialog progress. 2020-05-19 12:06:25 +02:00
Arisotura 19566178ba begin adding input dialog 2020-05-17 18:33:03 +02:00
Arisotura c9a76edf21 probably fix some pretty bad issue
good one, Generic
2020-05-17 14:23:06 +02:00
Arisotura 0566c9e34c minor fix 2020-05-17 13:04:02 +02:00
Arisotura c5c9434ac9 verify BIOS and firmware before booting games/firmware 2020-05-17 05:42:09 +02:00
Arisotura 60ba163f08 take this somewhere 2020-05-17 04:02:16 +02:00
Arisotura 2afa70b817 miserable little attempt at adding a dialog 2020-05-17 02:37:23 +02:00
Arisotura 978212e3e0 accept mouse events 2020-05-16 17:43:35 +02:00
Arisotura 9432a9f382 remove useless variables 2020-05-03 15:05:52 +02:00
Arisotura aa4344e249 add audio output. HARK HARK HARK 2020-05-02 20:25:39 +02:00
Arisotura 690f39ca33 enable savestate slots when saving a new savestate 2020-05-02 19:41:03 +02:00
Arisotura 7f3e67c12a some more UI work 2020-04-30 01:02:17 +02:00
Arisotura 5fbad464c2 hook up savestate shito 2020-04-29 00:50:23 +02:00
Arisotura 47ff012f5e blarg 2020-04-28 22:46:31 +02:00
Arisotura 63efc2e02a add menu items for running the firmware and for quitting. 2020-04-28 22:45:11 +02:00
Arisotura 0913576ef5 FPS counter is back 2020-04-27 23:58:29 +02:00
Arisotura a8aa834c16 now with display! 2020-04-27 22:42:07 +02:00
Arisotura 3c883a2152 hey look, it runs shit now! 2020-04-27 22:32:33 +02:00
Arisotura 931da1c66f add a bunch of code 2020-04-27 22:02:45 +02:00
Arisotura d9c55a4f1f fix dumb include path shit. 2020-04-27 15:59:52 +02:00
Arisotura 690f9f3874 get some of the shit going, I guess
atleast the emuthread is going and we have its control system down

and other fun shit, too
2020-04-27 12:06:44 +02:00
Arisotura 439ca1b2b5 get a Qt window showing up. 'tis a start, I guess. 2020-04-25 20:43:09 +02:00
Arisotura 3b3a09ed2b attempt something. maybe this worked, maybe not. 2020-04-25 18:48:33 +02:00
Arisotura 231f0fc2e5 welp 2020-04-14 23:38:48 +02:00