Win32 cleanup - Removed redundant GetHWND() that I made previously. Moved GetRomName() to common.h. Moved Ram Watch and Ram Search menu items to tools menu.
This commit is contained in:
parent
fde0833da2
commit
dd00cbd1b7
|
@ -82,6 +82,9 @@ extern u8 gba_header_data_0x04[156];
|
|||
extern u8 reverseBitsInByte(u8 x);
|
||||
extern void removeCR(char *buf);
|
||||
extern u32 strlen_ws(char *buf);
|
||||
|
||||
|
||||
const char* GetRomName(); //adelikat: return the name of the Rom currently loaded
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3988,11 +3988,6 @@ void UpdateHotkeyAssignments()
|
|||
ChangeMenuItemText(IDM_OPEN, text); //Set Menu item text
|
||||
}
|
||||
|
||||
HWND GetMainHWND()
|
||||
{
|
||||
return MainWindow->getHWnd();
|
||||
}
|
||||
|
||||
/***
|
||||
* Author: adelikat
|
||||
* Date Added: May 8, 2009
|
||||
|
|
|
@ -31,8 +31,5 @@ extern bool ShowLagFrameCounter;
|
|||
extern int backupmemorytype;
|
||||
extern u32 backupmemorysize;
|
||||
|
||||
HWND GetMainHWND(); //adelikat: returns the main window handle
|
||||
|
||||
const char* GetRomName(); //adelikat: return the name of the Rom currently loaded
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//RamWatch dialog was copied and adapted from GENS11: http://code.google.com/p/gens-rerecording/
|
||||
//Authors: Upthorn, Nitsuja, adelikat
|
||||
|
||||
#include "main.h"
|
||||
//#include "main.h"
|
||||
#include "resource.h"
|
||||
#include "common.h"
|
||||
#include "NDSSystem.h"
|
||||
|
@ -217,7 +217,7 @@ bool AskSave()
|
|||
//returns false only if a save was attempted but failed or was cancelled
|
||||
if (RWfileChanged)
|
||||
{
|
||||
HWND Hwnd = GetMainHWND();
|
||||
HWND Hwnd = MainWindow->getHWnd();
|
||||
int answer = MessageBox(Hwnd, "Save Changes?", "Ram Watch", MB_YESNOCANCEL);
|
||||
if(answer == IDYES)
|
||||
if(!QuickSaveWatches())
|
||||
|
|
|
@ -140,7 +140,7 @@ static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
|
|||
//Show the play movie dialog and play a movie
|
||||
void Replay_LoadMovie()
|
||||
{
|
||||
char* fn = (char*)DialogBoxParam(hAppInst, "IDD_REPLAYINP", GetMainHWND(), ReplayDialogProc, false);
|
||||
char* fn = (char*)DialogBoxParam(hAppInst, "IDD_REPLAYINP", MainWindow->getHWnd(), ReplayDialogProc, false);
|
||||
|
||||
if(fn)
|
||||
{
|
||||
|
@ -153,5 +153,5 @@ void Replay_LoadMovie()
|
|||
//Show the record movie dialog and record a movie.
|
||||
void MovieRecordTo()
|
||||
{
|
||||
DialogBoxParam(hAppInst, MAKEINTRESOURCE(IDD_RECORDMOVIE), GetMainHWND(), RecordDialogProc, (LPARAM)0);
|
||||
DialogBoxParam(hAppInst, MAKEINTRESOURCE(IDD_RECORDMOVIE), MainWindow->getHWnd(), RecordDialogProc, (LPARAM)0);
|
||||
}
|
||||
|
|
|
@ -484,7 +484,6 @@
|
|||
#define IDD_IOREG_VIEW_DMA 10006
|
||||
#define IDD_IOREG_VIEW_TIMERS 10007
|
||||
#define IDD_IOREG_VIEW_IPC_ROM 10008
|
||||
#define IDC_C_WATCHDUPLICATE 40000
|
||||
#define IDM_SCREENSEP_NONE 40000
|
||||
#define IDM_SCREENSEP_BORDER 40001
|
||||
#define IDM_SCREENSEP_NDSGAP 40002
|
||||
|
|
|
@ -293,8 +293,6 @@ MENU_PRINCIPAL MENU
|
|||
MENUITEM "Display Lag Counter", ID_VIEW_DISPLAYLAG
|
||||
MENUITEM "Display Microphone", ID_VIEW_DISPLAYMICROPHONE
|
||||
MENUITEM "HUD Editing Mode", ID_VIEW_HUDEDITOR
|
||||
MENUITEM "RAM Watch", ID_RAM_WATCH
|
||||
MENUITEM "RAM Search", ID_RAM_SEARCH
|
||||
}
|
||||
POPUP "&Config"
|
||||
{
|
||||
|
@ -349,6 +347,8 @@ MENU_PRINCIPAL MENU
|
|||
MENUITEM "View &OAM", IDM_OAM
|
||||
MENUITEM "View Matrices", IDM_MATRIX_VIEWER
|
||||
MENUITEM "View Lights", IDM_LIGHT_VIEWER
|
||||
MENUITEM "RAM Watch...", ID_RAM_WATCH
|
||||
MENUITEM "RAM Search...", ID_RAM_SEARCH
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&View Layers"
|
||||
{
|
||||
|
@ -1272,19 +1272,6 @@ FONT 8, "MS Sans Serif", 0, 0, 1
|
|||
|
||||
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
IDD_PROMPT DIALOG 0, 0, 186, 68
|
||||
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_FIXEDSYS | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
|
||||
CAPTION "Input Prompt"
|
||||
FONT 8, "Ms Shell Dlg 2"
|
||||
{
|
||||
DEFPUSHBUTTON "OK", IDOK, 100, 43, 50, 14, BS_DEFPUSHBUTTON
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 37, 42, 50, 14, BS_PUSHBUTTON
|
||||
EDITTEXT IDC_PROMPT_EDIT, 10, 15, 167, 14, ES_AUTOHSCROLL
|
||||
}
|
||||
|
||||
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
IDD_EDITWATCH DIALOGEX 0, 0, 181, 95
|
||||
STYLE DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
|
||||
|
@ -3236,6 +3223,19 @@ FONT 8, "MS Sans Serif", 0, 0, 1
|
|||
|
||||
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
IDD_PROMPT DIALOG 0, 0, 186, 68
|
||||
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
|
||||
CAPTION "Input Prompt"
|
||||
FONT 8, "Ms Shell Dlg 2"
|
||||
{
|
||||
DEFPUSHBUTTON "OK", IDOK, 100, 43, 50, 14, BS_DEFPUSHBUTTON
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 37, 42, 50, 14, BS_PUSHBUTTON
|
||||
EDITTEXT IDC_PROMPT_EDIT, 10, 15, 167, 14, ES_AUTOHSCROLL
|
||||
}
|
||||
|
||||
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
IDD_RAMSEARCH DIALOGEX 0, 0, 287, 292
|
||||
STYLE DS_MODALFRAME | DS_SHELLFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_GROUP | WS_POPUP | WS_SYSMENU
|
||||
|
@ -3487,14 +3487,14 @@ FONT 8, "Ms Shell Dlg"
|
|||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
IDR_ACCELERATOR1 ACCELERATORS
|
||||
{
|
||||
"N", RAMMENU_FILE_NEW, VIRTKEY, CONTROL, NOINVERT
|
||||
"O", RAMMENU_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT
|
||||
"S", RAMMENU_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT
|
||||
"S", RAMMENU_FILE_SAVEAS, VIRTKEY, SHIFT, CONTROL, NOINVERT
|
||||
"A", IDC_C_WATCH_DUPLICATE, VIRTKEY, NOINVERT
|
||||
"E", IDC_C_WATCH_EDIT, VIRTKEY, NOINVERT
|
||||
"D", IDC_C_WATCH_DOWN, VIRTKEY, NOINVERT
|
||||
"U", IDC_C_WATCH_UP, VIRTKEY, NOINVERT
|
||||
"N", IDC_C_WATCH, VIRTKEY, NOINVERT
|
||||
"R", IDC_C_WATCH_REMOVE, VIRTKEY, NOINVERT
|
||||
"N", RAMMENU_FILE_NEW, VIRTKEY, CONTROL
|
||||
"O", RAMMENU_FILE_OPEN, VIRTKEY, CONTROL
|
||||
"S", RAMMENU_FILE_SAVE, VIRTKEY, CONTROL
|
||||
"S", RAMMENU_FILE_SAVEAS, VIRTKEY, CONTROL, SHIFT
|
||||
"A", IDC_C_WATCH_DUPLICATE, VIRTKEY
|
||||
"E", IDC_C_WATCH_EDIT, VIRTKEY
|
||||
"D", IDC_C_WATCH_DOWN, VIRTKEY
|
||||
"U", IDC_C_WATCH_UP, VIRTKEY
|
||||
"N", IDC_C_WATCH, VIRTKEY
|
||||
"R", IDC_C_WATCH_REMOVE, VIRTKEY
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue