Merge pull request #1548 from brooksytech/dev
Rebase melonds-sa savestate patch on upstream
This commit is contained in:
commit
138c37a802
3 changed files with 53 additions and 79 deletions
|
@ -1,6 +1,5 @@
|
|||
np2kai # Last major commit before hiatus is broken.
|
||||
vice-sa # Doesn't support updating with the script.
|
||||
dolphin-sa # Wayland patch is now broken upstream
|
||||
melonds-sa # Needs patch updates.
|
||||
duckstation-lr #Libretro support removed from upstream.
|
||||
rpcs3-sa #Need to update to llvm 16
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
|
||||
|
||||
PKG_NAME="melonds-sa"
|
||||
PKG_VERSION="00edeb3c3c053bc2b3c9ac83e33688626498f2cc"
|
||||
PKG_VERSION="ca7fb4f55e8fdad53993ba279b073f97f453c13c"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/melonDS-emu/melonDS"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
|
|
|
@ -1,118 +1,93 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
|
||||
|
||||
diff -rupN melonDS.orig/src/frontend/qt_sdl/Config.cpp melonDS/src/frontend/qt_sdl/Config.cpp
|
||||
--- melonDS.orig/src/frontend/qt_sdl/Config.cpp 2023-01-20 17:14:09.563747030 -0800
|
||||
+++ melonDS/src/frontend/qt_sdl/Config.cpp 2023-01-21 17:24:03.796484493 -0800
|
||||
@@ -185,6 +185,8 @@ ConfigEntry ConfigFile[] =
|
||||
{"HKKey_SolarSensorDecrease", 0, &HKKeyMapping[HK_SolarSensorDecrease], -1, true},
|
||||
{"HKKey_SolarSensorIncrease", 0, &HKKeyMapping[HK_SolarSensorIncrease], -1, true},
|
||||
{"HKKey_FrameStep", 0, &HKKeyMapping[HK_FrameStep], -1, true},
|
||||
diff -rupN melonds-sa.orig/src/frontend/qt_sdl/Config.cpp melonds-sa/src/frontend/qt_sdl/Config.cpp
|
||||
--- melonds-sa.orig/src/frontend/qt_sdl/Config.cpp 2023-06-09 13:52:03.502169544 +0000
|
||||
+++ melonds-sa/src/frontend/qt_sdl/Config.cpp 2023-06-09 14:14:26.018915096 +0000
|
||||
@@ -191,6 +191,8 @@ ConfigEntry ConfigFile[] =
|
||||
{"HKKey_PowerButton", 0, &HKKeyMapping[HK_PowerButton], -1, true},
|
||||
{"HKKey_VolumeUp", 0, &HKKeyMapping[HK_VolumeUp], -1, true},
|
||||
{"HKKey_VolumeDown", 0, &HKKeyMapping[HK_VolumeDown], -1, true},
|
||||
+ {"HKKey_SaveState", 0, &HKKeyMapping[HK_SaveState], -1, true},
|
||||
+ {"HKKey_LoadState", 0, &HKKeyMapping[HK_LoadState], -1, true},
|
||||
|
||||
{"HKJoy_Lid", 0, &HKJoyMapping[HK_Lid], -1, true},
|
||||
{"HKJoy_Mic", 0, &HKJoyMapping[HK_Mic], -1, true},
|
||||
@@ -197,6 +199,8 @@ ConfigEntry ConfigFile[] =
|
||||
{"HKJoy_SolarSensorDecrease", 0, &HKJoyMapping[HK_SolarSensorDecrease], -1, true},
|
||||
{"HKJoy_SolarSensorIncrease", 0, &HKJoyMapping[HK_SolarSensorIncrease], -1, true},
|
||||
{"HKJoy_FrameStep", 0, &HKJoyMapping[HK_FrameStep], -1, true},
|
||||
@@ -207,6 +209,8 @@ ConfigEntry ConfigFile[] =
|
||||
{"HKJoy_PowerButton", 0, &HKJoyMapping[HK_PowerButton], -1, true},
|
||||
{"HKJoy_VolumeUp", 0, &HKJoyMapping[HK_VolumeUp], -1, true},
|
||||
{"HKJoy_VolumeDown", 0, &HKJoyMapping[HK_VolumeDown], -1, true},
|
||||
+ {"HKJoy_SaveState", 0, &HKJoyMapping[HK_SaveState], -1, true},
|
||||
+ {"HKJoy_LoadState", 0, &HKJoyMapping[HK_LoadState], -1, true},
|
||||
|
||||
{"JoystickID", 0, &JoystickID, 0, true},
|
||||
|
||||
diff -rupN melonDS.orig/src/frontend/qt_sdl/Config.h melonDS/src/frontend/qt_sdl/Config.h
|
||||
--- melonDS.orig/src/frontend/qt_sdl/Config.h 2023-01-20 17:14:09.563747030 -0800
|
||||
+++ melonDS/src/frontend/qt_sdl/Config.h 2023-01-21 17:24:03.796484493 -0800
|
||||
@@ -35,6 +35,8 @@ enum
|
||||
HK_SolarSensorDecrease,
|
||||
HK_SolarSensorIncrease,
|
||||
HK_FrameStep,
|
||||
diff -rupN melonds-sa.orig/src/frontend/qt_sdl/Config.h melonds-sa/src/frontend/qt_sdl/Config.h
|
||||
--- melonds-sa.orig/src/frontend/qt_sdl/Config.h 2023-06-09 13:52:03.502169544 +0000
|
||||
+++ melonds-sa/src/frontend/qt_sdl/Config.h 2023-06-09 13:55:47.705973753 +0000
|
||||
@@ -39,6 +39,8 @@ enum
|
||||
HK_PowerButton,
|
||||
HK_VolumeUp,
|
||||
HK_VolumeDown,
|
||||
+ HK_SaveState,
|
||||
+ HK_LoadState,
|
||||
HK_MAX
|
||||
};
|
||||
|
||||
diff -rupN melonDS.orig/src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp melonDS/src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp
|
||||
--- melonDS.orig/src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp 2023-01-20 17:14:09.563747030 -0800
|
||||
+++ melonDS/src/frontend/qt_sdl/InputConfig/InputConfigDialog.cpp 2023-01-21 17:24:03.800484522 -0800
|
||||
@@ -60,7 +60,9 @@ const int hk_general[] =
|
||||
HK_FullscreenToggle,
|
||||
HK_Lid,
|
||||
HK_Mic,
|
||||
- HK_SwapScreens
|
||||
+ HK_SwapScreens,
|
||||
diff -rupN melonds-sa.orig/src/frontend/qt_sdl/InputConfig/InputConfigDialog.h melonds-sa/src/frontend/qt_sdl/InputConfig/InputConfigDialog.h
|
||||
--- melonds-sa.orig/src/frontend/qt_sdl/InputConfig/InputConfigDialog.h 2023-06-09 13:52:03.502169544 +0000
|
||||
+++ melonds-sa/src/frontend/qt_sdl/InputConfig/InputConfigDialog.h 2023-06-09 14:10:04.074487398 +0000
|
||||
@@ -55,7 +55,9 @@ static constexpr std::initializer_list<i
|
||||
HK_SwapScreenEmphasis,
|
||||
HK_PowerButton,
|
||||
HK_VolumeUp,
|
||||
- HK_VolumeDown
|
||||
+ HK_VolumeDown,
|
||||
+ HK_SaveState,
|
||||
+ HK_LoadState
|
||||
};
|
||||
|
||||
const char* hk_general_labels[] =
|
||||
@@ -73,12 +75,14 @@ const char* hk_general_labels[] =
|
||||
"Toggle fullscreen",
|
||||
"Close/open lid",
|
||||
"Microphone",
|
||||
- "Swap screens"
|
||||
+ "Swap screens",
|
||||
static constexpr std::initializer_list<const char*> hk_general_labels =
|
||||
@@ -72,7 +74,9 @@ static constexpr std::initializer_list<c
|
||||
"Swap screen emphasis",
|
||||
"DSi Power button",
|
||||
"DSi Volume up",
|
||||
- "DSi Volume down"
|
||||
+ "DSi Volume down",
|
||||
+ "Save State",
|
||||
+ "Load State"
|
||||
};
|
||||
|
||||
const int keypad_num = 12;
|
||||
const int hk_addons_num = 2;
|
||||
-const int hk_general_num = 9;
|
||||
+const int hk_general_num = 11;
|
||||
|
||||
|
||||
InputConfigDialog::InputConfigDialog(QWidget* parent) : QDialog(parent), ui(new Ui::InputConfigDialog)
|
||||
diff -rupN melonDS.orig/src/frontend/qt_sdl/InputConfig/InputConfigDialog.h melonDS/src/frontend/qt_sdl/InputConfig/InputConfigDialog.h
|
||||
--- melonDS.orig/src/frontend/qt_sdl/InputConfig/InputConfigDialog.h 2023-01-20 17:14:09.563747030 -0800
|
||||
+++ melonDS/src/frontend/qt_sdl/InputConfig/InputConfigDialog.h 2023-01-21 17:24:03.800484522 -0800
|
||||
@@ -67,7 +67,7 @@ private:
|
||||
|
||||
int keypadKeyMap[12], keypadJoyMap[12];
|
||||
int addonsKeyMap[2], addonsJoyMap[2];
|
||||
- int hkGeneralKeyMap[9], hkGeneralJoyMap[9];
|
||||
+ int hkGeneralKeyMap[11], hkGeneralJoyMap[11];
|
||||
};
|
||||
|
||||
|
||||
diff -rupN melonDS.orig/src/frontend/qt_sdl/main.cpp melonDS/src/frontend/qt_sdl/main.cpp
|
||||
--- melonDS.orig/src/frontend/qt_sdl/main.cpp 2023-01-20 17:14:09.567747058 -0800
|
||||
+++ melonDS/src/frontend/qt_sdl/main.cpp 2023-01-21 17:24:03.804484550 -0800
|
||||
@@ -426,7 +426,9 @@ EmuThread::EmuThread(QObject* parent) :
|
||||
connect(this, SIGNAL(screenLayoutChange()), mainWindow->panelWidget, SLOT(onScreenLayoutChanged()));
|
||||
static_assert(hk_general.size() == hk_general_labels.size());
|
||||
diff -rupN melonds-sa.orig/src/frontend/qt_sdl/main.cpp melonds-sa/src/frontend/qt_sdl/main.cpp
|
||||
--- melonds-sa.orig/src/frontend/qt_sdl/main.cpp 2023-06-09 13:52:03.502169544 +0000
|
||||
+++ melonds-sa/src/frontend/qt_sdl/main.cpp 2023-06-09 14:11:34.273396945 +0000
|
||||
@@ -195,6 +195,8 @@ EmuThread::EmuThread(QObject* parent) :
|
||||
connect(this, SIGNAL(windowFullscreenToggle()), mainWindow, SLOT(onFullscreenToggled()));
|
||||
connect(this, SIGNAL(swapScreensToggle()), mainWindow->actScreenSwap, SLOT(trigger()));
|
||||
-
|
||||
connect(this, SIGNAL(screenEmphasisToggle()), mainWindow, SLOT(onScreenEmphasisToggled()));
|
||||
+ connect(this, SIGNAL(hkSaveState()), mainWindow->actSaveState[1], SLOT(trigger()));
|
||||
+ connect(this, SIGNAL(hkLoadState()), mainWindow->actLoadState[1], SLOT(trigger()));
|
||||
+
|
||||
|
||||
static_cast<ScreenPanelGL*>(mainWindow->panel)->transferLayout(this);
|
||||
}
|
||||
|
||||
@@ -596,7 +598,10 @@ void EmuThread::run()
|
||||
if (Input::HotkeyPressed(HK_FullscreenToggle)) emit windowFullscreenToggle();
|
||||
|
||||
@@ -368,6 +370,9 @@ void EmuThread::run()
|
||||
if (Input::HotkeyPressed(HK_SwapScreens)) emit swapScreensToggle();
|
||||
-
|
||||
+
|
||||
if (Input::HotkeyPressed(HK_SwapScreenEmphasis)) emit screenEmphasisToggle();
|
||||
|
||||
+ if (Input::HotkeyPressed(HK_SaveState)) emit hkSaveState();
|
||||
+ if (Input::HotkeyPressed(HK_LoadState)) emit hkLoadState();
|
||||
+
|
||||
if (Input::HotkeyPressed(HK_SolarSensorDecrease))
|
||||
{
|
||||
int level = GBACart::SetInput(GBACart::Input_SolarSensorDown, true);
|
||||
diff -rupN melonDS.orig/src/frontend/qt_sdl/main.h melonDS/src/frontend/qt_sdl/main.h
|
||||
--- melonDS.orig/src/frontend/qt_sdl/main.h 2023-01-20 17:14:09.567747058 -0800
|
||||
+++ melonDS/src/frontend/qt_sdl/main.h 2023-01-21 17:24:03.804484550 -0800
|
||||
@@ -85,6 +85,9 @@ signals:
|
||||
void windowFullscreenToggle();
|
||||
|
||||
diff -rupN melonds-sa.orig/src/frontend/qt_sdl/main.h melonds-sa/src/frontend/qt_sdl/main.h
|
||||
--- melonds-sa.orig/src/frontend/qt_sdl/main.h 2023-06-09 13:52:03.502169544 +0000
|
||||
+++ melonds-sa/src/frontend/qt_sdl/main.h 2023-06-09 14:05:33.969707409 +0000
|
||||
@@ -87,6 +87,9 @@ signals:
|
||||
void swapScreensToggle();
|
||||
+
|
||||
void screenEmphasisToggle();
|
||||
|
||||
+ void hkSaveState();
|
||||
+ void hkLoadState();
|
||||
+
|
||||
void syncVolumeLevel();
|
||||
|
||||
private:
|
||||
void drawScreenGL();
|
||||
|
|
Loading…
Reference in a new issue