Windows - added quicksave and quickload functions. It uses up 0,1,2,3,4,5,6,7,8,9,I, and P for accel keys. This is temporary until a re-mappable hotkey system is in place.
This commit is contained in:
parent
be28eb850a
commit
cb69e33190
|
@ -20,7 +20,6 @@
|
||||||
along with DeSmuME; if not, write to the Free Software
|
along with DeSmuME; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "windriver.h"
|
#include "windriver.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
@ -28,6 +27,7 @@
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string>
|
||||||
#include "CWindow.h"
|
#include "CWindow.h"
|
||||||
#include "../MMU.h"
|
#include "../MMU.h"
|
||||||
#include "../armcpu.h"
|
#include "../armcpu.h"
|
||||||
|
@ -176,6 +176,9 @@ bool frameCounterDisplay = false;
|
||||||
bool FpsDisplay = false;
|
bool FpsDisplay = false;
|
||||||
unsigned short windowSize = 0;
|
unsigned short windowSize = 0;
|
||||||
|
|
||||||
|
unsigned int lastSaveState = 0; //Keeps track of last savestate used for quick save/load functions
|
||||||
|
std::string MessageToDisplay = ""; //temp variable to store message that will be displayed via DisplayMessage function
|
||||||
|
|
||||||
/* the firmware settings */
|
/* the firmware settings */
|
||||||
struct NDS_fw_config_data win_fw_config;
|
struct NDS_fw_config_data win_fw_config;
|
||||||
|
|
||||||
|
@ -638,7 +641,6 @@ void CheckMessages()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DWORD WINAPI run( LPVOID lpParameter)
|
DWORD WINAPI run( LPVOID lpParameter)
|
||||||
{
|
{
|
||||||
char txt[80];
|
char txt[80];
|
||||||
|
@ -1780,6 +1782,41 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
case IDM_STATE_LOAD_F10:
|
case IDM_STATE_LOAD_F10:
|
||||||
StateLoadSlot(10);
|
StateLoadSlot(10);
|
||||||
return 0;
|
return 0;
|
||||||
|
case ACCEL_I: //Quick Save
|
||||||
|
StateSaveSlot(lastSaveState);
|
||||||
|
return 0;
|
||||||
|
case ACCEL_P: //Quick Load
|
||||||
|
StateLoadSlot(lastSaveState);
|
||||||
|
return 0;
|
||||||
|
//Save slot selection
|
||||||
|
case ACCEL_0:
|
||||||
|
lastSaveState = 0;
|
||||||
|
return 0;
|
||||||
|
case ACCEL_1:
|
||||||
|
lastSaveState = 1;
|
||||||
|
return 0;
|
||||||
|
case ACCEL_2:
|
||||||
|
lastSaveState = 2;
|
||||||
|
return 0;
|
||||||
|
case ACCEL_3:
|
||||||
|
lastSaveState = 3;
|
||||||
|
return 0;
|
||||||
|
case ACCEL_4:
|
||||||
|
lastSaveState = 4;
|
||||||
|
return 0;
|
||||||
|
case ACCEL_5:
|
||||||
|
lastSaveState = 5;
|
||||||
|
case ACCEL_6:
|
||||||
|
lastSaveState = 6;
|
||||||
|
return 0;
|
||||||
|
case ACCEL_7:
|
||||||
|
lastSaveState = 7;
|
||||||
|
case ACCEL_8:
|
||||||
|
lastSaveState = 8;
|
||||||
|
return 0;
|
||||||
|
case ACCEL_9:
|
||||||
|
lastSaveState = 9;
|
||||||
|
return 0;
|
||||||
case IDM_IMPORTBACKUPMEMORY:
|
case IDM_IMPORTBACKUPMEMORY:
|
||||||
{
|
{
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
|
|
|
@ -333,13 +333,24 @@
|
||||||
#define ID_FILE_STOPAVI 40014
|
#define ID_FILE_STOPAVI 40014
|
||||||
#define IDM_FILE_RECORDAVI 40015
|
#define IDM_FILE_RECORDAVI 40015
|
||||||
#define IDM_FILE_STOPAVI 40016
|
#define IDM_FILE_STOPAVI 40016
|
||||||
|
#define ACCEL_I 40018
|
||||||
|
#define ACCEL_0 40020
|
||||||
|
#define ACCEL_1 40021
|
||||||
|
#define ACCEL_3 40023
|
||||||
|
#define ACCEL_2 40024
|
||||||
|
#define ACCEL_4 40025
|
||||||
|
#define ACCEL_5 40026
|
||||||
|
#define ACCEL_6 40027
|
||||||
|
#define ACCEL_7 40028
|
||||||
|
#define ACCEL_8 40029
|
||||||
|
#define ACCEL_9 40030
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 107
|
#define _APS_NEXT_RESOURCE_VALUE 107
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40018
|
#define _APS_NEXT_COMMAND_VALUE 40032
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1018
|
#define _APS_NEXT_CONTROL_VALUE 1018
|
||||||
#define _APS_NEXT_SYMED_VALUE 112
|
#define _APS_NEXT_SYMED_VALUE 112
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
#pragma code_page(1251)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -49,6 +49,18 @@ BEGIN
|
||||||
VK_F7, IDM_STATE_SAVE_F7, VIRTKEY, SHIFT, NOINVERT
|
VK_F7, IDM_STATE_SAVE_F7, VIRTKEY, SHIFT, NOINVERT
|
||||||
VK_F8, IDM_STATE_SAVE_F8, VIRTKEY, SHIFT, NOINVERT
|
VK_F8, IDM_STATE_SAVE_F8, VIRTKEY, SHIFT, NOINVERT
|
||||||
VK_F9, IDM_STATE_SAVE_F9, VIRTKEY, SHIFT, NOINVERT
|
VK_F9, IDM_STATE_SAVE_F9, VIRTKEY, SHIFT, NOINVERT
|
||||||
|
"I", ACCEL_I, VIRTKEY, NOINVERT
|
||||||
|
"P", ACCEL_P, VIRTKEY, NOINVERT
|
||||||
|
"0", ACCEL_0, VIRTKEY, NOINVERT
|
||||||
|
"1", ACCEL_1, VIRTKEY, NOINVERT
|
||||||
|
"2", ACCEL_2, VIRTKEY, NOINVERT
|
||||||
|
"3", ACCEL_3, VIRTKEY, NOINVERT
|
||||||
|
"4", ACCEL_4, VIRTKEY, NOINVERT
|
||||||
|
"5", ACCEL_5, VIRTKEY, NOINVERT
|
||||||
|
"6", ACCEL_6, VIRTKEY, NOINVERT
|
||||||
|
"7", ACCEL_7, VIRTKEY, NOINVERT
|
||||||
|
"8", ACCEL_8, VIRTKEY, NOINVERT
|
||||||
|
"9", ACCEL_9, VIRTKEY, NOINVERT
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // Neutral resources
|
#endif // Neutral resources
|
||||||
|
|
Loading…
Reference in New Issue