win32: pass #2 of adding snes9x input configuration - hotkey system added

This commit is contained in:
zeromus 2009-02-11 03:05:59 +00:00
parent c9bf594a3f
commit 41b8605937
6 changed files with 486 additions and 342 deletions

View File

@ -31,6 +31,8 @@
#include <tchar.h>
#include <io.h>
#include <string>
#if (((defined(_MSC_VER) && _MSC_VER >= 1300)) || defined(__MINGW32__))
// both MINGW and VS.NET use fstream instead of fstream.h which is deprecated
#include <fstream>
@ -91,46 +93,6 @@
#define HOTKEYS_ALT_MOD "Alt + "
#define HOTKEYS_LABEL_BLUE "Blue means the hotkey is already mapped.\nPink means it conflicts with a game button.\nRed means it's reserved by Windows.\nA hotkey can be disabled using Escape."
#define HOTKEYS_HKCOMBO "Page %d"
#define HOTKEYS_LABEL_1_1 "speed +"
#define HOTKEYS_LABEL_1_2 "speed -"
#define HOTKEYS_LABEL_1_3 "pause"
#define HOTKEYS_LABEL_1_4 "frame advance"
#define HOTKEYS_LABEL_1_5 "fast forward"
#define HOTKEYS_LABEL_1_6 "skip +"
#define HOTKEYS_LABEL_1_7 "skip -"
#define HOTKEYS_LABEL_1_8 "superscope turbo"
#define HOTKEYS_LABEL_1_9 "superscope pause"
#define HOTKEYS_LABEL_1_10 "show pressed keys"
#define HOTKEYS_LABEL_1_11 "movie frame count"
#define HOTKEYS_LABEL_1_12 "movie read-only"
#define HOTKEYS_LABEL_1_13 "save screenshot"
#define HOTKEYS_LABEL_2_1 "Graphics Layer 1"
#define HOTKEYS_LABEL_2_2 "Graphics Layer 2"
#define HOTKEYS_LABEL_2_3 "Graphics Layer 3"
#define HOTKEYS_LABEL_2_4 "Graphics Layer 4"
#define HOTKEYS_LABEL_2_5 "Sprites Layer"
#define HOTKEYS_LABEL_2_6 "Clipping Windows"
#define HOTKEYS_LABEL_2_7 "Transparency"
#define HOTKEYS_LABEL_2_8 "HDMA Emulation"
#define HOTKEYS_LABEL_2_9 "GLCube Mode"
#define HOTKEYS_LABEL_2_10 "Switch Controllers"
#define HOTKEYS_LABEL_2_11 "Joypad Swap"
#define HOTKEYS_LABEL_2_12 "Reset Game"
#define HOTKEYS_LABEL_2_13 "Toggle Cheats"
#define HOTKEYS_LABEL_3_1 "Turbo A mode"
#define HOTKEYS_LABEL_3_2 "Turbo B mode"
#define HOTKEYS_LABEL_3_3 "Turbo Y mode"
#define HOTKEYS_LABEL_3_4 "Turbo X mode"
#define HOTKEYS_LABEL_3_5 "Turbo L mode"
#define HOTKEYS_LABEL_3_6 "Turbo R mode"
#define HOTKEYS_LABEL_3_7 "Turbo Start mode"
#define HOTKEYS_LABEL_3_8 "Turbo Select mode"
#define HOTKEYS_LABEL_3_9 "Turbo Left mode"
#define HOTKEYS_LABEL_3_10 "Turbo Up mode"
#define HOTKEYS_LABEL_3_11 "Turbo Right mode"
#define HOTKEYS_LABEL_3_12 "Turbo Down mode"
//#define HOTKEYS_LABEL_4_12 "Interpolate Mode 7"
//#define HOTKEYS_LABEL_4_13 "BG Layering hack"
// gaming buttons and axes
#define GAMEDEVICE_JOYNUMPREFIX "(J%x)" // don't change this
@ -243,7 +205,6 @@ SJoyState JoystickF [16];
SJoypad ToggleJoypadStorage[8];
SJoypad TurboToggleJoypadStorage[8];
u32 joypads [8];
SCustomKeys CustomKeys;
//the main input configuration:
SJoypad DefaultJoypad[16] = {
@ -280,6 +241,26 @@ extern volatile BOOL paused;
#define MAXKEYPAD 15
#define WM_CUSTKEYDOWN (WM_USER+50)
#define WM_CUSTKEYUP (WM_USER+51)
#define NUM_HOTKEY_CONTROLS 20
#define COUNT(a) (sizeof (a) / sizeof (a[0]))
const int IDC_LABEL_HK_Table[NUM_HOTKEY_CONTROLS] = {
IDC_LABEL_HK1 , IDC_LABEL_HK2 , IDC_LABEL_HK3 , IDC_LABEL_HK4 , IDC_LABEL_HK5 ,
IDC_LABEL_HK6 , IDC_LABEL_HK7 , IDC_LABEL_HK8 , IDC_LABEL_HK9 , IDC_LABEL_HK10,
IDC_LABEL_HK11, IDC_LABEL_HK12, IDC_LABEL_HK13, IDC_LABEL_HK14, IDC_LABEL_HK15,
IDC_LABEL_HK16, IDC_LABEL_HK17, IDC_LABEL_HK18, IDC_LABEL_HK19, IDC_LABEL_HK20,
};
const int IDC_HOTKEY_Table[NUM_HOTKEY_CONTROLS] = {
IDC_HOTKEY1 , IDC_HOTKEY2 , IDC_HOTKEY3 , IDC_HOTKEY4 , IDC_HOTKEY5 ,
IDC_HOTKEY6 , IDC_HOTKEY7 , IDC_HOTKEY8 , IDC_HOTKEY9 , IDC_HOTKEY10,
IDC_HOTKEY11, IDC_HOTKEY12, IDC_HOTKEY13, IDC_HOTKEY14, IDC_HOTKEY15,
IDC_HOTKEY16, IDC_HOTKEY17, IDC_HOTKEY18, IDC_HOTKEY19, IDC_HOTKEY20,
};
typedef char TcDIBuf[512];
TcDIBuf cDIBuf;
@ -353,7 +334,40 @@ static void ReadControl(const char* name, WORD& output)
}
}
static void LoadConfig()
static void ReadHotkey(const char* name, WORD& output)
{
UINT temp;
temp = GetPrivateProfileInt("Hotkeys",name,-1,IniName);
if(temp != -1) {
output = temp;
}
}
static void LoadHotkeyConfig()
{
SCustomKey *key = CustomKeys.key;
while (!IsLastCustomKey(key)) {
ReadHotkey(key->code,key->key);
std::string modname = (std::string)key->code + (std::string)" MOD";
ReadHotkey(modname.c_str(),key->modifiers);
key++;
}
}
static void SaveHotkeyConfig()
{
SCustomKey *key = CustomKeys.key;
while (!IsLastCustomKey(key)) {
WritePrivateProfileInt("Hotkeys",(char*)key->code,key->key,IniName);
std::string modname = (std::string)key->code + (std::string)" MOD";
WritePrivateProfileInt("Hotkeys",(char*)modname.c_str(),key->modifiers,IniName);
key++;
}
}
static void LoadInputConfig()
{
memcpy(&Joypad,&DefaultJoypad,sizeof(Joypad));
@ -374,7 +388,7 @@ static void WriteControl(char* name, WORD val)
WritePrivateProfileInt("Controls",name,val,IniName);
}
static void SaveConfig()
static void SaveInputConfig()
{
#define DO(X) WriteControl(#X,Joypad[0] . X);
DO(Left); DO(Right); DO(Up); DO(Down);
@ -390,8 +404,6 @@ BOOL di_init()
{
HWND hParentWnd = MainWindow->getHWnd();
LoadConfig();
pDI = NULL;
pJoystick = NULL;
Feedback = FALSE;
@ -983,75 +995,29 @@ bool IsReserved (WORD Key, int modifiers)
return false;
}
int GetNumHotKeysAssignedTo (WORD Key, int modifiers)
{
int count = 0;
{
#define MATCHES_KEY(k) \
(Key != 0 && Key != VK_ESCAPE \
&& ((Key == CustomKeys.k.key && modifiers == CustomKeys.k.modifiers) \
|| (Key == VK_SHIFT && CustomKeys.k.modifiers & CUSTKEY_SHIFT_MASK) \
|| (Key == VK_MENU && CustomKeys.k.modifiers & CUSTKEY_ALT_MASK) \
|| (Key == VK_CONTROL && CustomKeys.k.modifiers & CUSTKEY_CTRL_MASK) \
|| (CustomKeys.k.key == VK_SHIFT && modifiers & CUSTKEY_SHIFT_MASK) \
|| (CustomKeys.k.key == VK_MENU && modifiers & CUSTKEY_ALT_MASK) \
|| (CustomKeys.k.key == VK_CONTROL && modifiers & CUSTKEY_CTRL_MASK)))
#define MATCHES_KEY(k) \
(Key != 0 && Key != VK_ESCAPE \
&& ((Key == k->key && modifiers == k->modifiers) \
|| (Key == VK_SHIFT && k->modifiers & CUSTKEY_SHIFT_MASK) \
|| (Key == VK_MENU && k->modifiers & CUSTKEY_ALT_MASK) \
|| (Key == VK_CONTROL && k->modifiers & CUSTKEY_CTRL_MASK) \
|| (k->key == VK_SHIFT && modifiers & CUSTKEY_SHIFT_MASK) \
|| (k->key == VK_MENU && modifiers & CUSTKEY_ALT_MASK) \
|| (k->key == VK_CONTROL && modifiers & CUSTKEY_CTRL_MASK)))
SCustomKey *key = CustomKeys.key;
while (!IsLastCustomKey(key)) {
if (MATCHES_KEY(key)) {
count++;
}
key++;
}
if(MATCHES_KEY(SpeedUp)) count++;
if(MATCHES_KEY(SpeedDown)) count++;
if(MATCHES_KEY(Pause)) count++;
if(MATCHES_KEY(FrameAdvance)) count++;
if(MATCHES_KEY(SkipUp)) count++;
if(MATCHES_KEY(SkipDown)) count++;
if(MATCHES_KEY(ScopeTurbo)) count++;
if(MATCHES_KEY(ScopePause)) count++;
if(MATCHES_KEY(FrameCount)) count++;
if(MATCHES_KEY(ReadOnly)) count++;
for(int i = 0 ; i < 10 ; i++) {
if(MATCHES_KEY(Save[i])) count++;
if(MATCHES_KEY(Load[i])) count++;
if(MATCHES_KEY(SelectSave[i])) count++;
}
if(MATCHES_KEY(FastForward)) count++;
if(MATCHES_KEY(ShowPressed)) count++;
if(MATCHES_KEY(SaveScreenShot)) count++;
if(MATCHES_KEY(SlotPlus)) count++;
if(MATCHES_KEY(SlotMinus)) count++;
if(MATCHES_KEY(SlotSave)) count++;
if(MATCHES_KEY(SlotLoad)) count++;
if(MATCHES_KEY(BGL1)) count++;
if(MATCHES_KEY(BGL2)) count++;
if(MATCHES_KEY(BGL3)) count++;
if(MATCHES_KEY(BGL4)) count++;
if(MATCHES_KEY(BGL5)) count++;
if(MATCHES_KEY(ClippingWindows)) count++;
// if(MATCHES_KEY(BGLHack)) count++;
if(MATCHES_KEY(Transparency)) count++;
if(MATCHES_KEY(GLCube)) count++;
// if(MATCHES_KEY(InterpMode7)) count++;
if(MATCHES_KEY(JoypadSwap)) count++;
if(MATCHES_KEY(SwitchControllers)) count++;
if(MATCHES_KEY(TurboA)) count++;
if(MATCHES_KEY(TurboB)) count++;
if(MATCHES_KEY(TurboY)) count++;
if(MATCHES_KEY(TurboX)) count++;
if(MATCHES_KEY(TurboL)) count++;
if(MATCHES_KEY(TurboR)) count++;
if(MATCHES_KEY(TurboStart)) count++;
if(MATCHES_KEY(TurboSelect)) count++;
if(MATCHES_KEY(TurboLeft)) count++;
if(MATCHES_KEY(TurboUp)) count++;
if(MATCHES_KEY(TurboRight)) count++;
if(MATCHES_KEY(TurboDown)) count++;
if(MATCHES_KEY(ResetGame)) count++;
if(MATCHES_KEY(ToggleCheats)) count++;
for(int i = 0 ; i < 8 ; i++) {
if(MATCHES_KEY(ToggleSound[i])) count++;
}
for(int i = 0 ; i < 8 ; i++) {
if(MATCHES_KEY(ToggleMacro[i])) count++;
}
if(MATCHES_KEY(EditMacro)) count++;
#undef MATCHES_KEY
}
@ -1915,8 +1881,7 @@ switch(msg)
case IDOK:
//Settings.UpAndDown = IsDlgButtonChecked(hDlg, IDC_ALLOWLEFTRIGHT);
//WinSaveConfigFile(); //TODO
SaveConfig();
SaveInputConfig();
EndDialog(hDlg,0);
break;
@ -2198,6 +2163,10 @@ void input_feedback(BOOL enable)
void input_init()
{
InitCustomControls();
LoadInputConfig();
LoadHotkeyConfig();
di_init();
FeedbackON = input_feedback;
}
@ -2226,6 +2195,151 @@ void input_process()
NDS_setPad( R, L, D, U, T, S, B, A, Y, X, W, E, G, F);
}
static void set_hotkeyinfo(HWND hDlg)
{
HotkeyPage page = (HotkeyPage) SendDlgItemMessage(hDlg,IDC_HKCOMBO,CB_GETCURSEL,0,0);
SCustomKey *key = CustomKeys.key;
int i = 0;
while (!IsLastCustomKey(key) && i < NUM_HOTKEY_CONTROLS) {
if (page == key->page) {
SendDlgItemMessage(hDlg, IDC_HOTKEY_Table[i], WM_USER+44, key->key, key->modifiers);
SetDlgItemText(hDlg, IDC_LABEL_HK_Table[i], key->name);
ShowWindow(GetDlgItem(hDlg, IDC_HOTKEY_Table[i]), SW_SHOW);
i++;
}
key++;
}
// disable unused controls
for (; i < NUM_HOTKEY_CONTROLS; i++) {
SendDlgItemMessage(hDlg, IDC_HOTKEY_Table[i], WM_USER+44, 0, 0);
SetDlgItemText(hDlg, IDC_LABEL_HK_Table[i], INPUTCONFIG_LABEL_UNUSED);
ShowWindow(GetDlgItem(hDlg, IDC_HOTKEY_Table[i]), SW_HIDE);
}
}
// DlgHotkeyConfig
INT_PTR CALLBACK DlgHotkeyConfig(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
int i, which;
static HotkeyPage page = (HotkeyPage) 0;
static SCustomKeys keys;
//HBRUSH g_hbrBackground;
switch(msg)
{
case WM_PAINT:
{
PAINTSTRUCT ps;
BeginPaint (hDlg, &ps);
EndPaint (hDlg, &ps);
}
return true;
case WM_INITDIALOG:
//if(DirectX.Clipped) S9xReRefresh();
SetWindowText(hDlg,HOTKEYS_TITLE);
// insert hotkey page list items
for(i = 0 ; i < NUM_HOTKEY_PAGE ; i++)
{
SendDlgItemMessage(hDlg, IDC_HKCOMBO, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)hotkeyPageTitle[i]);
}
SendDlgItemMessage(hDlg,IDC_HKCOMBO,CB_SETCURSEL,(WPARAM)0,0);
InitCustomKeys(&keys);
CopyCustomKeys(&keys, &CustomKeys);
for( i=0;i<256;i++)
{
GetAsyncKeyState(i);
}
SetDlgItemText(hDlg,IDC_LABEL_BLUE,HOTKEYS_LABEL_BLUE);
set_hotkeyinfo(hDlg);
PostMessage(hDlg,WM_COMMAND, CBN_SELCHANGE<<16, 0);
SetFocus(GetDlgItem(hDlg,IDC_HKCOMBO));
return true;
break;
case WM_CLOSE:
EndDialog(hDlg, 0);
return TRUE;
case WM_USER+46:
// refresh command, for clicking away from a selected field
page = (HotkeyPage) SendDlgItemMessage(hDlg, IDC_HKCOMBO, CB_GETCURSEL, 0, 0);
set_hotkeyinfo(hDlg);
return TRUE;
case WM_USER+43:
{
//MessageBox(hDlg,"USER+43 CAUGHT","moo",MB_OK);
int modifiers = GetModifiers(wParam);
page = (HotkeyPage) SendDlgItemMessage(hDlg, IDC_HKCOMBO, CB_GETCURSEL, 0, 0);
TCHAR text[256];
which = GetDlgCtrlID((HWND)lParam);
for (i = 0; i < NUM_HOTKEY_CONTROLS; i++) {
if (which == IDC_HOTKEY_Table[i])
break;
}
GetDlgItemText(hDlg, IDC_LABEL_HK_Table[i], text, COUNT(text));
SCustomKey *key = CustomKeys.key;
while (!IsLastCustomKey(key)) {
if (page == key->page) {
if (lstrcmp(text, key->name) == 0) {
key->key = wParam;
key->modifiers = modifiers;
break;
}
}
key++;
}
set_hotkeyinfo(hDlg);
PostMessage(hDlg,WM_NEXTDLGCTL,0,0);
// PostMessage(hDlg,WM_KILLFOCUS,0,0);
}
return true;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDCANCEL:
CopyCustomKeys(&CustomKeys, &keys);
EndDialog(hDlg,0);
break;
case IDOK:
SaveHotkeyConfig();
EndDialog(hDlg,0);
break;
}
switch(HIWORD(wParam))
{
case CBN_SELCHANGE:
page = (HotkeyPage) SendDlgItemMessage(hDlg, IDC_HKCOMBO, CB_GETCURSEL, 0, 0);
SendDlgItemMessage(hDlg, IDC_HKCOMBO, CB_SETCURSEL, (WPARAM)page, 0);
set_hotkeyinfo(hDlg);
SetFocus(GetDlgItem(hDlg, IDC_HKCOMBO));
break;
}
return FALSE;
}
return FALSE;
}
void RunInputConfig()
{
@ -2234,7 +2348,7 @@ void RunInputConfig()
void RunHotkeyConfig()
{
DialogBox(hAppInst, MAKEINTRESOURCE(IDD_KEYCUSTOM), MainWindow->getHWnd(), DlgInputConfig);
DialogBox(hAppInst, MAKEINTRESOURCE(IDD_KEYCUSTOM), MainWindow->getHWnd(), DlgHotkeyConfig);
}

View File

@ -23,11 +23,6 @@
#ifndef INPUTDX_INCLUDED
#define INPUTDX_INCLUDED
void InitInputCustomControl(void);
HWND CreateInputCustom(HWND hwndParent);
void InitKeyCustomControl(void);
HWND CreateKeyCustom(HWND hwndParent);
typedef struct
{
COLORREF crForeGnd; // Foreground text colour
@ -43,52 +38,8 @@ InputCust * GetInputCustom(HWND hwnd);
#define CUSTKEY_CTRL_MASK 0x02
#define CUSTKEY_SHIFT_MASK 0x04
struct SCustomKey {
WORD key;
WORD modifiers;
};
struct SCustomKeys {
SCustomKey SpeedUp;
SCustomKey SpeedDown;
SCustomKey Pause;
SCustomKey FrameAdvance;
SCustomKey SkipUp;
SCustomKey SkipDown;
SCustomKey ScopeTurbo;
SCustomKey ScopePause;
SCustomKey FrameCount;
SCustomKey ReadOnly;
SCustomKey Save [10];
SCustomKey Load [10];
SCustomKey FastForward;
SCustomKey ShowPressed;
SCustomKey SaveScreenShot;
SCustomKey SlotPlus;
SCustomKey SlotMinus;
SCustomKey SlotSave;
SCustomKey SlotLoad;
SCustomKey BGL1;
SCustomKey BGL2;
SCustomKey BGL3;
SCustomKey BGL4;
SCustomKey BGL5;
SCustomKey ClippingWindows;
// SCustomKey BGLHack;
SCustomKey Transparency;
SCustomKey HDMA;
SCustomKey GLCube;
// SCustomKey InterpMode7;
SCustomKey JoypadSwap;
SCustomKey SwitchControllers;
SCustomKey TurboA, TurboB, TurboY, TurboX, TurboL, TurboR, TurboStart, TurboSelect, TurboLeft, TurboUp, TurboRight, TurboDown;
SCustomKey SelectSave [10];
SCustomKey ResetGame;
SCustomKey ToggleCheats;
SCustomKey ToggleSound [8];
SCustomKey ToggleMacro [8];
SCustomKey EditMacro;
};
struct SJoypad {
BOOL Enabled;
@ -157,7 +108,7 @@ struct SJoyState{
extern SJoypad Joypad[16];
extern SJoypad ToggleJoypadStorage[8];
extern SCustomKeys CustomKeys;
//extern SCustomKeys CustomKeys;
extern SJoypad TurboToggleJoypadStorage[8];

View File

@ -33,6 +33,7 @@
#include <string>
#include <vector>
#include <sstream>
#include <tchar.h>
#include "CWindow.h"
#include "../MMU.h"
#include "../armcpu.h"
@ -70,6 +71,7 @@
#include "cheatsWin.h"
#include "../common.h"
#include "main.h"
#include "snddx.h"
@ -119,6 +121,9 @@ LPDIRECTDRAWCLIPPER lpDDClipBack=NULL;
//===================== Input vars
//INPUTCLASS *input = NULL;
#define WM_CUSTKEYDOWN (WM_USER+50)
#define WM_CUSTKEYUP (WM_USER+51)
#ifndef EXPERIMENTAL_GBASLOT
/* The compact flash disk image file */
static const char *bad_glob_cflash_disk_image_file;
@ -1299,19 +1304,14 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
EnableMenuItem(mainMenu, IDM_GBASLOT, MF_GRAYED);
#endif
LOG("Init NDS\n");
//input = new INPUTCLASS();
//if (!input->Init(MainWindow->getHWnd(), &NDS_inputPost))
//{
// MessageBox(NULL, "Error DXInput init\n", "DeSmuME", MB_OK);
// exit(-1);
//}
//NDS_inputInit();
InitCustomKeys(&CustomKeys);
void input_init();
input_init();
LOG("Init NDS\n");
ViewDisasm_ARM7 = new TOOLSCLASS(hThisInstance, IDD_DESASSEMBLEUR_VIEWER7, (DLGPROC) ViewDisasm_ARM7Proc);
ViewDisasm_ARM9 = new TOOLSCLASS(hThisInstance, IDD_DESASSEMBLEUR_VIEWER9, (DLGPROC) ViewDisasm_ARM9Proc);
ViewMem_ARM7 = new TOOLSCLASS(hThisInstance, IDD_MEM_VIEWER7, (DLGPROC) ViewMem_ARM7Proc);
@ -1776,6 +1776,11 @@ LRESULT OpenFile()
return 0;
}
void SetDefaults()
{
InitCustomKeys(&CustomKeys);
}
//TODO - async key state? for real?
int GetModifiers(int key)
{
@ -1790,16 +1795,121 @@ int GetModifiers(int key)
return modifiers;
}
SCustomKeys CustomKeys;
int HandleKeyUp(WPARAM wParam, LPARAM lParam, int modifiers)
{
SCustomKey *key = CustomKeys.key;
while (!IsLastCustomKey(key)) {
if (wParam == key->key && modifiers == key->modifiers && key->handleKeyUp) {
key->handleKeyUp();
}
key++;
}
return 1;
}
int HandleKeyMessage(WPARAM wParam, LPARAM lParam, int modifiers)
{
//some crap from snes9x I dont understand with toggles and macros...
bool hitHotKey = false;
if(!(wParam == 0 || wParam == VK_ESCAPE)) // if it's the 'disabled' key, it's never pressed as a hotkey
{
SCustomKey *key = CustomKeys.key;
while (!IsLastCustomKey(key)) {
if (wParam == key->key && modifiers == key->modifiers && key->handleKeyDown) {
key->handleKeyDown();
hitHotKey = true;
}
key++;
}
// don't pull down menu if alt is a hotkey or the menu isn't there, unless no game is running
//if(!Settings.StopEmulation && ((wParam == VK_MENU || wParam == VK_F10) && (hitHotKey || GetMenu (GUI.hWnd) == NULL) && !GetAsyncKeyState(VK_F4)))
// return 0;
}
if((wParam == 0 || wParam == VK_ESCAPE)) // if it's the 'disabled' key, it's never pressed as a hotkey
return 0;
return 1;
}
return 0;
bool IsLastCustomKey (const SCustomKey *key)
{
return (key->key == 0xFFFF && key->modifiers == 0xFFFF);
}
void SetLastCustomKey (SCustomKey *key)
{
key->key = 0xFFFF;
key->modifiers = 0xFFFF;
}
void ZeroCustomKeys (SCustomKeys *keys)
{
UINT i = 0;
SetLastCustomKey(&keys->LastItem);
while (!IsLastCustomKey(&keys->key[i])) {
keys->key[i].key = 0;
keys->key[i].modifiers = 0;
i++;
};
}
void HK_PrintScreen()
{
OPENFILENAME ofn;
char filename[MAX_PATH] = "";
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = MainWindow->getHWnd();
ofn.lpstrFilter = "Bmp file (*.bmp)\0*.bmp\0Any file (*.*)\0*.*\0\0";
ofn.nFilterIndex = 1;
ofn.lpstrFile = filename;
ofn.lpstrTitle = "Print Screen Save As";
ofn.nMaxFile = MAX_PATH;
ofn.lpstrDefExt = "bmp";
ofn.Flags = OFN_OVERWRITEPROMPT;
GetSaveFileName(&ofn);
NDS_WriteBMP(filename);
}
void CopyCustomKeys (SCustomKeys *dst, const SCustomKeys *src)
{
UINT i = 0;
do {
dst->key[i] = src->key[i];
} while (!IsLastCustomKey(&src->key[i++]));
}
void InitCustomKeys (SCustomKeys *keys)
{
UINT i = 0;
SetLastCustomKey(&keys->LastItem);
while (!IsLastCustomKey(&keys->key[i])) {
keys->key[i].key = 0;
keys->key[i].modifiers = 0;
keys->key[i].handleKeyDown = NULL;
keys->key[i].handleKeyUp = NULL;
keys->key[i].page = NUM_HOTKEY_PAGE;
keys->key[i].name = NULL;
//keys->key[i].timing = PROCESS_NOW;
i++;
};
//set handlers
keys->PrintScreen.handleKeyDown = HK_PrintScreen;
keys->PrintScreen.code = "PrintScreen";
keys->PrintScreen.name = _T("Print Screen");
keys->PrintScreen.page = HOTKEY_PAGE_TOOLS;
keys->PrintScreen.key = VK_PAUSE;
}
void RunConfig(int num)
@ -1818,8 +1928,8 @@ void RunConfig(int num)
RunInputConfig();
break;
case 1:
/*void RunHotkeyConfig();
RunHotkeyConfig();*/
void RunHotkeyConfig();
RunHotkeyConfig();
break;
case 2:
DialogBox(hAppInst,MAKEINTRESOURCE(IDD_FIRMSETTINGS), hwnd, (DLGPROC) FirmConfig_Proc);
@ -1905,6 +2015,23 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
}
return 1;
//break;
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
case WM_CUSTKEYDOWN:
{
int modifiers = GetModifiers(wParam);
if(!HandleKeyMessage(wParam,lParam, modifiers))
return 0;
break;
}
case WM_CUSTKEYUP:
{
int modifiers = GetModifiers(wParam);
HandleKeyUp(wParam, lParam, modifiers);
}
break;
case WM_SIZE:
switch(wParam)
{
@ -2020,22 +2147,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
case IDM_OPEN:
return OpenFile();
case IDM_PRINTSCREEN:
{
OPENFILENAME ofn;
char filename[MAX_PATH] = "";
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwnd;
ofn.lpstrFilter = "Bmp file (*.bmp)\0*.bmp\0Any file (*.*)\0*.*\0\0";
ofn.nFilterIndex = 1;
ofn.lpstrFile = filename;
ofn.nMaxFile = MAX_PATH;
ofn.lpstrDefExt = "bmp";
ofn.Flags = OFN_OVERWRITEPROMPT;
GetSaveFileName(&ofn);
NDS_WriteBMP(filename);
}
return 0;
HK_PrintScreen();
return 0;
case IDM_QUICK_PRINTSCREEN:
{
NDS_WriteBMP("./printscreen.bmp");
@ -2663,13 +2776,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
}
break;
case WM_SYSKEYDOWN:
{
int modifiers = GetModifiers(wParam);
if(!HandleKeyMessage(wParam,lParam, modifiers))
return 0;
break;
}
case IDM_DEFSIZE:
{

View File

@ -4,4 +4,48 @@
#include "CWindow.h"
extern WINCLASS *MainWindow;
enum HotkeyPage {
HOTKEY_PAGE_TOOLS=0,
HOTKEY_PAGE_PLACEHOLDER=1,
NUM_HOTKEY_PAGE,
};
static LPCTSTR hotkeyPageTitle[] = {
_T("Tools"),
_T("Placeholder"),
_T("NUM_HOTKEY_PAGE"),
};
struct SCustomKey {
typedef void (*THandler) (void);
WORD key;
WORD modifiers;
THandler handleKeyDown;
THandler handleKeyUp;
HotkeyPage page;
LPCTSTR name;
const char* code;
//HotkeyTiming timing;
};
union SCustomKeys {
struct {
SCustomKey PrintScreen;
SCustomKey LastItem; // dummy, must be last
};
SCustomKey key[];
};
extern SCustomKeys CustomKeys;
bool IsLastCustomKey (const SCustomKey *key);
void CopyCustomKeys (SCustomKeys *dst, const SCustomKeys *src);
void InitCustomKeys (SCustomKeys *keys);
int GetModifiers(int key);
#endif

View File

@ -450,16 +450,6 @@
#define IDC_AUTO_UPDATE2 111
#define IDC_VISIBLE 1019
#define IDM_ABOUT 40003
#define IDC_LABEL_HK1 60001
#define IDC_LABEL_HK4 60002
#define IDC_LABEL_HK2 60003
#define IDC_LABEL_HK3 60004
#define IDC_LABEL_HK6 60005
#define IDC_LABEL_HK11 60006
#define IDC_LABEL_HK8 60007
#define IDC_LABEL_HK12 60008
#define IDC_LABEL_HK9 60009
#define IDC_LABEL_HK7 60010
#define IDC_HOTKEY1 60011
#define IDC_HOTKEY2 60012
#define IDC_HOTKEY3 60013
@ -473,59 +463,33 @@
#define IDC_HOTKEY11 60021
#define IDC_HOTKEY12 60022
#define IDC_HOTKEY13 60023
#define IDC_SAVE1 60024
#define IDC_LABEL_UP1 60025
#define IDC_SAVE2 60026
#define IDC_LABEL_UP2 60027
#define IDC_SAVE3 60028
#define IDC_LABEL_UP3 60029
#define IDC_SAVE4 60030
#define IDC_LABEL_UP4 60031
#define IDC_SAVE5 60032
#define IDC_LABEL_UP5 60033
#define IDC_SAVE6 60034
#define IDC_LABEL_UP6 60035
#define IDC_SAVE7 60036
#define IDC_LABEL_UP7 60037
#define IDC_SAVE8 60038
#define IDC_LABEL_UP8 60039
#define IDC_SAVE9 60040
#define IDC_LABEL_UP9 60041
#define IDC_SAVE10 60042
#define IDC_LABEL_UP10 60043
#define IDC_SAVE11 60044
#define IDC_LABEL_UP11 60045
#define IDC_SAVE12 60046
#define IDC_LABEL_UP12 60047
#define IDC_SAVE13 60048
#define IDC_LABEL_UP13 60049
#define IDC_SAVE14 60050
#define IDC_LABEL_UP14 60051
#define IDC_SAVE15 60052
#define IDC_LABEL_UP15 60053
#define IDC_SAVE16 60054
#define IDC_LABEL_UP16 60055
#define IDC_SAVE17 60056
#define IDC_LABEL_UP17 60057
#define IDC_SAVE18 60058
#define IDC_LABEL_UP18 60059
#define IDC_SAVE19 60060
#define IDC_LABEL_UP19 60061
#define IDC_SAVE20 60062
#define IDC_LABEL_UP20 60063
#define IDC_SAVE21 60064
#define IDC_LABEL_UP21 60065
#define IDC_LABEL_HK5 60066
#define IDC_LABEL_HK10 60067
#define IDC_LABEL_HK13 60068
#define IDC_LABEL_UP22 60069
#define IDC_SLOTMINUS 60070
#define IDC_LABEL_UP23 60071
#define IDC_SLOTPLUS 60072
#define IDC_LABEL_UP24 60073
#define IDC_SLOTSAVE 60074
#define IDC_LABEL_UP25 60075
#define IDC_SLOTLOAD 60076
#define IDC_HOTKEY14 60024
#define IDC_HOTKEY15 60025
#define IDC_HOTKEY16 60026
#define IDC_HOTKEY17 60027
#define IDC_HOTKEY18 60028
#define IDC_HOTKEY19 60029
#define IDC_HOTKEY20 60030
#define IDC_LABEL_HK1 60001
#define IDC_LABEL_HK2 60002
#define IDC_LABEL_HK3 60003
#define IDC_LABEL_HK4 60004
#define IDC_LABEL_HK5 60005
#define IDC_LABEL_HK6 60006
#define IDC_LABEL_HK7 60007
#define IDC_LABEL_HK8 60008
#define IDC_LABEL_HK9 60009
#define IDC_LABEL_HK10 60031
#define IDC_LABEL_HK11 60032
#define IDC_LABEL_HK12 60033
#define IDC_LABEL_HK13 60034
#define IDC_LABEL_HK14 60035
#define IDC_LABEL_HK15 60036
#define IDC_LABEL_HK16 60037
#define IDC_LABEL_HK17 60038
#define IDC_LABEL_HK18 60049
#define IDC_LABEL_HK19 60040
#define IDC_LABEL_HK20 60041
#define IDC_HKCOMBO 60077
#define IDD_KEYCUSTOM 60078
#define IDM_HOTKEY_CONFIG 60079

View File

@ -2247,91 +2247,56 @@ BEGIN
CONTROL " ",IDC_DEBUG,"InputCustom",WS_DISABLED | WS_TABSTOP,163,120,71,12,WS_EX_CLIENTEDGE
END
IDD_KEYCUSTOM DIALOGEX 0, 0, 349, 203
IDD_KEYCUSTOM DIALOGEX 0, 0, 382, 180
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION
CAPTION "Customize Special Keys"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
PUSHBUTTON "Cancel",IDCANCEL,66,182,50,14
PUSHBUTTON "OK",IDOK,16,182,50,14
RTEXT "speed +",IDC_LABEL_HK1,4,8,58,8
RTEXT "frame advance",IDC_LABEL_HK4,2,47,59,8
RTEXT "speed -",IDC_LABEL_HK2,3,21,59,8
RTEXT "pause",IDC_LABEL_HK3,2,34,60,8
RTEXT "skip +",IDC_LABEL_HK6,2,74,60,8
RTEXT "movie frame count",IDC_LABEL_HK11,0,138,62,8
RTEXT "superscope turbo",IDC_LABEL_HK8,0,98,62,8
RTEXT "movie read-only",IDC_LABEL_HK12,3,150,59,8
RTEXT "superscope pause",IDC_LABEL_HK9,2,111,60,8
RTEXT "skip -",IDC_LABEL_HK7,3,85,59,8
CONTROL "",IDC_HOTKEY1,"InputCustomHot",WS_TABSTOP,66,5,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY2,"InputCustomHot",WS_TABSTOP,66,18,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY3,"InputCustomHot",WS_TABSTOP,66,31,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY4,"InputCustomHot",WS_TABSTOP,66,45,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY5,"InputCustomHot",WS_TABSTOP,66,58,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY6,"InputCustomHot",WS_TABSTOP,66,70,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY7,"InputCustomHot",WS_TABSTOP,66,83,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY8,"InputCustomHot",WS_TABSTOP,66,96,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY9,"InputCustomHot",WS_TABSTOP,66,109,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY10,"InputCustomHot",WS_TABSTOP,66,122,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY11,"InputCustomHot",WS_TABSTOP,66,135,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY12,"InputCustomHot",WS_TABSTOP,66,149,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY13,"InputCustomHot",WS_TABSTOP,66,162,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_SAVE1,"InputCustomHot",WS_TABSTOP,192,5,60,12,WS_EX_CLIENTEDGE
RTEXT "save1",IDC_LABEL_UP2,170,21,20,8
CONTROL "",IDC_SAVE2,"InputCustomHot",WS_TABSTOP,192,18,60,12,WS_EX_CLIENTEDGE
RTEXT "save2",IDC_LABEL_UP3,170,34,20,8
CONTROL "",IDC_SAVE3,"InputCustomHot",WS_TABSTOP,192,31,60,12,WS_EX_CLIENTEDGE
RTEXT "save3",IDC_LABEL_UP4,170,47,20,8
CONTROL "",IDC_SAVE4,"InputCustomHot",WS_TABSTOP,192,45,60,12,WS_EX_CLIENTEDGE
RTEXT "save4",IDC_LABEL_UP5,170,58,20,8
CONTROL "",IDC_SAVE5,"InputCustomHot",WS_TABSTOP,192,58,60,12,WS_EX_CLIENTEDGE
RTEXT "save5",IDC_LABEL_UP6,170,72,20,8
CONTROL "",IDC_SAVE6,"InputCustomHot",WS_TABSTOP,192,71,60,12,WS_EX_CLIENTEDGE
RTEXT "save6",IDC_LABEL_UP7,170,85,20,8
CONTROL "",IDC_SAVE7,"InputCustomHot",WS_TABSTOP,192,82,60,12,WS_EX_CLIENTEDGE
RTEXT "save7",IDC_LABEL_UP8,170,98,20,8
CONTROL "",IDC_SAVE8,"InputCustomHot",WS_TABSTOP,192,96,60,12,WS_EX_CLIENTEDGE
RTEXT "save8",IDC_LABEL_UP9,170,112,20,8
CONTROL "",IDC_SAVE9,"InputCustomHot",WS_TABSTOP,192,109,60,12,WS_EX_CLIENTEDGE
RTEXT "save9",IDC_LABEL_UP10,170,125,20,8
CONTROL "",IDC_SAVE10,"InputCustomHot",WS_TABSTOP,192,122,60,12,WS_EX_CLIENTEDGE
RTEXT "save0",IDC_LABEL_UP11,170,8,20,8
CONTROL "",IDC_SAVE11,"InputCustomHot",WS_TABSTOP,279,5,60,12,WS_EX_CLIENTEDGE
RTEXT "load1",IDC_LABEL_UP12,257,21,20,8
CONTROL "",IDC_SAVE12,"InputCustomHot",WS_TABSTOP,279,18,60,12,WS_EX_CLIENTEDGE
RTEXT "load2",IDC_LABEL_UP13,257,34,20,8
CONTROL "",IDC_SAVE13,"InputCustomHot",WS_TABSTOP,279,31,60,12,WS_EX_CLIENTEDGE
RTEXT "load3",IDC_LABEL_UP14,257,48,20,8
CONTROL "",IDC_SAVE14,"InputCustomHot",WS_TABSTOP,279,45,60,12,WS_EX_CLIENTEDGE
RTEXT "load4",IDC_LABEL_UP15,257,61,20,8
CONTROL "",IDC_SAVE15,"InputCustomHot",WS_TABSTOP,279,58,60,12,WS_EX_CLIENTEDGE
RTEXT "load5",IDC_LABEL_UP16,257,72,20,8
CONTROL "",IDC_SAVE16,"InputCustomHot",WS_TABSTOP,279,71,60,12,WS_EX_CLIENTEDGE
RTEXT "load6",IDC_LABEL_UP17,257,85,20,8
CONTROL "",IDC_SAVE17,"InputCustomHot",WS_TABSTOP,279,82,60,12,WS_EX_CLIENTEDGE
RTEXT "load7",IDC_LABEL_UP18,257,98,20,8
CONTROL "",IDC_SAVE18,"InputCustomHot",WS_TABSTOP,279,96,60,12,WS_EX_CLIENTEDGE
RTEXT "load8",IDC_LABEL_UP19,257,111,20,8
CONTROL "",IDC_SAVE19,"InputCustomHot",WS_TABSTOP,279,109,60,12,WS_EX_CLIENTEDGE
RTEXT "load9",IDC_LABEL_UP20,257,125,20,8
CONTROL "",IDC_SAVE20,"InputCustomHot",WS_TABSTOP,279,122,60,12,WS_EX_CLIENTEDGE
RTEXT "load0",IDC_LABEL_UP21,257,8,20,8
RTEXT "fast forward",IDC_LABEL_HK5,3,61,58,8
RTEXT "show pressed keys",IDC_LABEL_HK10,1,125,61,8
RTEXT "save screenshot",IDC_LABEL_HK13,3,163,59,8
RTEXT "slot-",IDC_LABEL_UP22,170,138,20,8
CONTROL "",IDC_SLOTMINUS,"InputCustomHot",WS_TABSTOP,192,135,60,12,WS_EX_CLIENTEDGE
RTEXT "slot+",IDC_LABEL_UP23,257,138,20,8
CONTROL "",IDC_SLOTPLUS,"InputCustomHot",WS_TABSTOP,279,135,60,12,WS_EX_CLIENTEDGE
RTEXT "save#",IDC_LABEL_UP24,166,151,23,8
CONTROL "",IDC_SLOTSAVE,"InputCustomHot",WS_TABSTOP,192,149,60,12,WS_EX_CLIENTEDGE
RTEXT "load#",IDC_LABEL_UP25,253,151,23,8
CONTROL "",IDC_SLOTLOAD,"InputCustomHot",WS_TABSTOP,279,149,60,12,WS_EX_CLIENTEDGE
LTEXT "Blue means the hotkey is already mapped.\nPink means it conflicts with a game button.\nRed means it's reserved by Windows.\nA hotkey can be disabled using Escape.",IDC_LABEL_BLUE,208,164,136,32
COMBOBOX IDC_HKCOMBO,134,183,60,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "OK",IDOK,16,159,50,14
PUSHBUTTON "Cancel",IDCANCEL,66,159,50,14
RTEXT "Item #01",IDC_LABEL_HK1,2,7,80,8
RTEXT "Item #02",IDC_LABEL_HK2,2,20,80,8
RTEXT "Item #03",IDC_LABEL_HK3,2,33,80,8
RTEXT "Item #04",IDC_LABEL_HK4,2,47,80,8
RTEXT "Item #05",IDC_LABEL_HK5,2,60,80,8
RTEXT "Item #06",IDC_LABEL_HK6,2,72,80,8
RTEXT "Item #07",IDC_LABEL_HK7,2,85,80,8
RTEXT "Item #08",IDC_LABEL_HK8,2,98,80,8
RTEXT "Item #09",IDC_LABEL_HK9,2,111,80,8
RTEXT "Item #10",IDC_LABEL_HK10,2,124,80,8
RTEXT "Item #11",IDC_LABEL_HK11,192,7,80,8
RTEXT "Item #12",IDC_LABEL_HK12,192,20,80,8
RTEXT "Item #13",IDC_LABEL_HK13,192,33,80,8
RTEXT "Item #14",IDC_LABEL_HK14,192,47,80,8
RTEXT "Item #15",IDC_LABEL_HK15,192,60,80,8
RTEXT "Item #16",IDC_LABEL_HK16,192,72,80,8
RTEXT "Item #17",IDC_LABEL_HK17,192,85,80,8
RTEXT "Item #18",IDC_LABEL_HK18,192,98,80,8
RTEXT "Item #19",IDC_LABEL_HK19,192,111,80,8
RTEXT "Item #20",IDC_LABEL_HK20,192,124,80,8
CONTROL "",IDC_HOTKEY1,"InputCustomHot",WS_TABSTOP,86,5,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY2,"InputCustomHot",WS_TABSTOP,86,18,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY3,"InputCustomHot",WS_TABSTOP,86,31,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY4,"InputCustomHot",WS_TABSTOP,86,45,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY5,"InputCustomHot",WS_TABSTOP,86,58,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY6,"InputCustomHot",WS_TABSTOP,86,70,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY7,"InputCustomHot",WS_TABSTOP,86,83,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY8,"InputCustomHot",WS_TABSTOP,86,96,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY9,"InputCustomHot",WS_TABSTOP,86,109,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY10,"InputCustomHot",WS_TABSTOP,86,122,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY11,"InputCustomHot",WS_TABSTOP,276,5,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY12,"InputCustomHot",WS_TABSTOP,276,18,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY13,"InputCustomHot",WS_TABSTOP,276,31,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY14,"InputCustomHot",WS_TABSTOP,276,45,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY15,"InputCustomHot",WS_TABSTOP,276,58,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY16,"InputCustomHot",WS_TABSTOP,276,70,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY17,"InputCustomHot",WS_TABSTOP,276,83,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY18,"InputCustomHot",WS_TABSTOP,276,96,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY19,"InputCustomHot",WS_TABSTOP,276,109,98,12,WS_EX_CLIENTEDGE
CONTROL "",IDC_HOTKEY20,"InputCustomHot",WS_TABSTOP,276,122,98,12,WS_EX_CLIENTEDGE
LTEXT "Blue means the hotkey is already mapped.\nPink means it conflicts with a game button.\nRed means it's reserved by Windows.\nA hotkey can be disabled using Escape.",IDC_LABEL_BLUE,238,140,136,32
COMBOBOX IDC_HKCOMBO,16,141,168,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
//
// Accelerator resources
//