-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Imagine: Add overloaded constructor for DynArray using std::make_unique_for_overwrite() to optimize case where memory is immediately overwritten * EmuFramework: Add system reset actions to key bindings * EmuFramework: Allow inexact state sizes in uncompressGzipState() * GBA.emu: Update core to VBA-M GIT 64d8cff (2023.11.16) * NES.emu: Update core to FCEUX GIT 5a5faa7 (2023.10.26) * Snes9x EX+: Update core to Snes9x GIT d30060c (2023.11.03)
- Loading branch information
Robert Broglia
committed
Nov 17, 2023
1 parent
71bcd12
commit ce75bd1
Showing
46 changed files
with
992 additions
and
463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* This file is part of EmuFramework. | ||
Imagine is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Imagine is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with EmuFramework. If not, see <http://www.gnu.org/licenses/> */ | ||
|
||
#include <imagine/gui/AlertView.hh> | ||
#include <emuframework/EmuApp.hh> | ||
#include <emuframework/EmuSystem.hh> | ||
|
||
namespace EmuEx | ||
{ | ||
|
||
class ResetAlertView : public BaseAlertView | ||
{ | ||
public: | ||
ResetAlertView(ViewAttachParams attach, UTF16Convertible auto &&label, EmuApp &app): | ||
BaseAlertView{attach, IG_forward(label), items}, | ||
items | ||
{ | ||
TextMenuItem | ||
{ | ||
"Soft Reset", &defaultFace(), | ||
[this, &app]() | ||
{ | ||
app.system().reset(app, EmuSystem::ResetMode::SOFT); | ||
app.showEmulation(); | ||
} | ||
}, | ||
TextMenuItem | ||
{ | ||
"Hard Reset", &defaultFace(), | ||
[this, &app]() | ||
{ | ||
app.system().reset(app, EmuSystem::ResetMode::HARD); | ||
app.showEmulation(); | ||
} | ||
}, | ||
TextMenuItem{"Cancel", &defaultFace(), [](){}} | ||
} {} | ||
|
||
protected: | ||
std::array<TextMenuItem, 3> items; | ||
}; | ||
|
||
inline std::unique_ptr<View> resetAlertView(ViewAttachParams attachParams, EmuApp &app) | ||
{ | ||
if(EmuSystem::hasResetModes) | ||
{ | ||
return std::make_unique<ResetAlertView>(attachParams, "Really reset?", app); | ||
} | ||
else | ||
{ | ||
return std::make_unique<YesNoAlertView>(attachParams, "Really reset?", | ||
YesNoAlertView::Delegates | ||
{ | ||
.onYes = [&app] | ||
{ | ||
app.system().reset(app, EmuSystem::ResetMode::SOFT); | ||
app.showEmulation(); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
#define N_(String) (String) | ||
|
||
#define MSG_UNSUPPORTED_VBA_SGM 1 | ||
#define MSG_CANNOT_LOAD_SGM 2 | ||
#define MSG_SAVE_GAME_NOT_USING_BIOS 3 | ||
#define MSG_SAVE_GAME_USING_BIOS 4 | ||
#define MSG_UNSUPPORTED_SAVE_TYPE 5 | ||
#define MSG_CANNOT_OPEN_FILE 6 | ||
#define MSG_BAD_ZIP_FILE 7 | ||
#define MSG_NO_IMAGE_ON_ZIP 8 | ||
#define MSG_ERROR_OPENING_IMAGE 9 | ||
#define MSG_ERROR_READING_IMAGE 10 | ||
#define MSG_UNSUPPORTED_BIOS_FUNCTION 11 | ||
#define MSG_INVALID_BIOS_FILE_SIZE 12 | ||
#define MSG_INVALID_CHEAT_CODE 13 | ||
#define MSG_UNKNOWN_ARM_OPCODE 14 | ||
#define MSG_UNKNOWN_THUMB_OPCODE 15 | ||
#define MSG_ERROR_CREATING_FILE 16 | ||
#define MSG_FAILED_TO_READ_SGM 17 | ||
#define MSG_FAILED_TO_READ_RTC 18 | ||
#define MSG_UNSUPPORTED_VB_SGM 19 | ||
#define MSG_CANNOT_LOAD_SGM_FOR 20 | ||
#define MSG_ERROR_OPENING_IMAGE_FROM 21 | ||
#define MSG_ERROR_READING_IMAGE_FROM 22 | ||
#define MSG_UNSUPPORTED_ROM_SIZE 23 | ||
#define MSG_UNSUPPORTED_RAM_SIZE 24 | ||
#define MSG_UNKNOWN_CARTRIDGE_TYPE 25 | ||
#define MSG_MAXIMUM_NUMBER_OF_CHEATS 26 | ||
#define MSG_INVALID_GAMESHARK_CODE 27 | ||
#define MSG_INVALID_GAMEGENIE_CODE 28 | ||
#define MSG_INVALID_CHEAT_TO_REMOVE 29 | ||
#define MSG_INVALID_CHEAT_CODE_ADDRESS 30 | ||
#define MSG_UNSUPPORTED_VBA_SGM 1 | ||
#define MSG_CANNOT_LOAD_SGM 2 | ||
#define MSG_SAVE_GAME_NOT_USING_BIOS 3 | ||
#define MSG_SAVE_GAME_USING_BIOS 4 | ||
#define MSG_UNSUPPORTED_SAVE_TYPE 5 | ||
#define MSG_CANNOT_OPEN_FILE 6 | ||
#define MSG_BAD_ZIP_FILE 7 | ||
#define MSG_NO_IMAGE_ON_ZIP 8 | ||
#define MSG_ERROR_OPENING_IMAGE 9 | ||
#define MSG_ERROR_READING_IMAGE 10 | ||
#define MSG_UNSUPPORTED_BIOS_FUNCTION 11 | ||
#define MSG_INVALID_BIOS_FILE_SIZE 12 | ||
#define MSG_INVALID_CHEAT_CODE 13 | ||
#define MSG_UNKNOWN_ARM_OPCODE 14 | ||
#define MSG_UNKNOWN_THUMB_OPCODE 15 | ||
#define MSG_ERROR_CREATING_FILE 16 | ||
#define MSG_FAILED_TO_READ_SGM 17 | ||
#define MSG_FAILED_TO_READ_RTC 18 | ||
#define MSG_UNSUPPORTED_VB_SGM 19 | ||
#define MSG_CANNOT_LOAD_SGM_FOR 20 | ||
#define MSG_ERROR_OPENING_IMAGE_FROM 21 | ||
#define MSG_ERROR_READING_IMAGE_FROM 22 | ||
#define MSG_UNSUPPORTED_ROM_SIZE 23 | ||
#define MSG_UNSUPPORTED_RAM_SIZE 24 | ||
#define MSG_UNKNOWN_CARTRIDGE_TYPE 25 | ||
#define MSG_MAXIMUM_NUMBER_OF_CHEATS 26 | ||
#define MSG_INVALID_GAMESHARK_CODE 27 | ||
#define MSG_INVALID_GAMEGENIE_CODE 28 | ||
#define MSG_INVALID_CHEAT_TO_REMOVE 29 | ||
#define MSG_INVALID_CHEAT_CODE_ADDRESS 30 | ||
#define MSG_UNSUPPORTED_CHEAT_LIST_VERSION 31 | ||
#define MSG_UNSUPPORTED_CHEAT_LIST_TYPE 32 | ||
#define MSG_INVALID_GSA_CODE 33 | ||
#define MSG_CANNOT_IMPORT_SNAPSHOT_FOR 34 | ||
#define MSG_UNSUPPORTED_SNAPSHOT_FILE 35 | ||
#define MSG_UNSUPPORTED_ARM_MODE 36 | ||
#define MSG_UNSUPPORTED_CODE_FILE 37 | ||
#define MSG_GBA_CODE_WARNING 38 | ||
#define MSG_INVALID_CBA_CODE 39 | ||
#define MSG_CBA_CODE_WARNING 40 | ||
#define MSG_OUT_OF_MEMORY 41 | ||
#define MSG_WRONG_GAMESHARK_CODE 42 | ||
#define MSG_UNSUPPORTED_GAMESHARK_CODE 43 | ||
#define MSG_UNSUPPORTED_CHEAT_LIST_TYPE 32 | ||
#define MSG_INVALID_GSA_CODE 33 | ||
#define MSG_CANNOT_IMPORT_SNAPSHOT_FOR 34 | ||
#define MSG_UNSUPPORTED_SNAPSHOT_FILE 35 | ||
#define MSG_UNSUPPORTED_ARM_MODE 36 | ||
#define MSG_UNSUPPORTED_CODE_FILE 37 | ||
#define MSG_GBA_CODE_WARNING 38 | ||
#define MSG_INVALID_CBA_CODE 39 | ||
#define MSG_CBA_CODE_WARNING 40 | ||
#define MSG_OUT_OF_MEMORY 41 | ||
#define MSG_WRONG_GAMESHARK_CODE 42 | ||
#define MSG_UNSUPPORTED_GAMESHARK_CODE 43 | ||
#define MSG_INVALID_GAME_BOY_NINTENDO_LOGO 44 | ||
#define MSG_INVALID_HEADER_CHECKSUM 45 |
Oops, something went wrong.