Win32 - removed frame advance from menu since it caused too many problems
This commit is contained in:
parent
aafb4cac59
commit
ee073a7049
|
@ -84,7 +84,6 @@ BEGIN
|
||||||
POPUP "Emulation"
|
POPUP "Emulation"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Pause", ID_NES_PAUSE
|
MENUITEM "Pause", ID_NES_PAUSE
|
||||||
MENUITEM "Frame Advance", ID_NES_FRAMEADVANCE
|
|
||||||
MENUITEM "Turbo", ID_NES_TURBO
|
MENUITEM "Turbo", ID_NES_TURBO
|
||||||
END
|
END
|
||||||
POPUP "Emulation Speed"
|
POPUP "Emulation Speed"
|
||||||
|
@ -1622,7 +1621,7 @@ BEGIN
|
||||||
DEFPUSHBUTTON "OK",INSERTCS_IDOK,7,55,50,14
|
DEFPUSHBUTTON "OK",INSERTCS_IDOK,7,55,50,14
|
||||||
PUSHBUTTON "Cancel",INSERTCS_IDCANCEL,89,55,50,14
|
PUSHBUTTON "Cancel",INSERTCS_IDCANCEL,89,55,50,14
|
||||||
EDITTEXT INSERTCS_MESSAGE,7,30,133,14,ES_AUTOHSCROLL
|
EDITTEXT INSERTCS_MESSAGE,7,30,133,14,ES_AUTOHSCROLL
|
||||||
LTEXT "Insert Message:",INSERTCS_STATIC,39,14,53,8
|
LTEXT "Insert Message",INSERTCS_STATIC,34,14,87,8
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ static LONG WindowXC=1<<30,WindowYC;
|
||||||
int MainWindow_wndx, MainWindow_wndy;
|
int MainWindow_wndx, MainWindow_wndy;
|
||||||
static uint32 mousex,mousey,mouseb;
|
static uint32 mousex,mousey,mouseb;
|
||||||
static int vchanged = 0;
|
static int vchanged = 0;
|
||||||
|
bool CommentSubtitle = false; //Toggle for comment/subtitle dialog box
|
||||||
//Recent Menu Strings ------------------------------------
|
//Recent Menu Strings ------------------------------------
|
||||||
char *recent_files[] = { 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };
|
char *recent_files[] = { 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };
|
||||||
const unsigned int MENU_FIRST_RECENT_FILE = 600;
|
const unsigned int MENU_FIRST_RECENT_FILE = 600;
|
||||||
|
@ -957,12 +957,9 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
|
|
||||||
//Emulation submenu
|
//Emulation submenu
|
||||||
case ID_NES_PAUSE:
|
case ID_NES_PAUSE:
|
||||||
EmulationPaused ^= 1;
|
FCEUI_ToggleEmulationPause();
|
||||||
UpdateCheckedMenuItems();
|
UpdateCheckedMenuItems();
|
||||||
break;
|
break;
|
||||||
case ID_NES_FRAMEADVANCE:
|
|
||||||
FCEUI_FrameAdvance();
|
|
||||||
break;
|
|
||||||
case ID_NES_TURBO:
|
case ID_NES_TURBO:
|
||||||
FCEUD_TurboToggle();
|
FCEUD_TurboToggle();
|
||||||
break;
|
break;
|
||||||
|
@ -1999,24 +1996,26 @@ LRESULT CALLBACK InsertCommentSubtitleProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
||||||
|
|
||||||
|
|
||||||
static int *success;
|
static int *success;
|
||||||
//string message;
|
char message[128]; //Will contain the contents of the edit box
|
||||||
char message[128];
|
stringstream frame; //Converts current frame number to stringstream
|
||||||
stringstream frame;
|
|
||||||
frame << currFrameCounter;
|
frame << currFrameCounter;
|
||||||
string Subtitle;
|
string Subtitle; //Subtitle string
|
||||||
|
wstring Comment; //Comment string
|
||||||
|
|
||||||
|
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
if (lParam)
|
if (CommentSubtitle)
|
||||||
SetDlgItemText(hDlg,INSERTCS_STATIC, "Insert Comment:");
|
SetDlgItemText(hDlg,INSERTCS_STATIC, "Insert Comment:");
|
||||||
else
|
else
|
||||||
SetDlgItemText(hDlg, INSERTCS_STATIC, "Insert Subtitle:");
|
SetDlgItemText(hDlg, INSERTCS_STATIC, "Insert Subtitle:");
|
||||||
// Nothing very useful to do
|
|
||||||
success = (int*)lParam;
|
success = (int*)lParam;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
case WM_QUIT:
|
case WM_QUIT:
|
||||||
|
@ -2030,14 +2029,23 @@ LRESULT CALLBACK InsertCommentSubtitleProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
||||||
{
|
{
|
||||||
case INSERTCS_IDOK:
|
case INSERTCS_IDOK:
|
||||||
{
|
{
|
||||||
GetDlgItemText(hDlg, INSERTCS_MESSAGE, message, 128);
|
if (CommentSubtitle) //Comment
|
||||||
Subtitle = frame.str() + " " + message;
|
{
|
||||||
FCEU_printf("%s",Subtitle.c_str());
|
GetDlgItemText(hDlg, INSERTCS_MESSAGE, message, 128); //Place the text in the edit box into message[128]
|
||||||
currMovieData.subtitles.push_back(Subtitle);
|
Comment = mbstowcs(message);
|
||||||
|
currMovieData.comments.push_back(Comment);
|
||||||
|
}
|
||||||
|
else //Subtitle
|
||||||
|
{
|
||||||
|
GetDlgItemText(hDlg, INSERTCS_MESSAGE, message, 128); //Place the text in the edit box into message[128]
|
||||||
|
Subtitle = frame.str() + " " + message; //Add frame number to beginning of message
|
||||||
|
FCEU_printf("%s",Subtitle.c_str()); //Debug, output string
|
||||||
|
//currMovieData.subtitles.push_back(Subtitle);
|
||||||
EndDialog(hDlg, 0);
|
EndDialog(hDlg, 0);
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case INSERTCS_IDCANCEL:
|
case INSERTCS_IDCANCEL:
|
||||||
{
|
{
|
||||||
|
@ -2052,14 +2060,13 @@ LRESULT CALLBACK InsertCommentSubtitleProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
||||||
}
|
}
|
||||||
void InsertSubtitle(HWND main)
|
void InsertSubtitle(HWND main)
|
||||||
{
|
{
|
||||||
|
//TODO: unless more commands are added these two functions can be consolidated to 1 with a bool argument
|
||||||
|
CommentSubtitle = false;
|
||||||
DialogBoxParam(fceu_hInstance, MAKEINTRESOURCE(INSERTCOMMENTSUBTITLE), main, (DLGPROC) InsertCommentSubtitleProc,(LPARAM) 0);
|
DialogBoxParam(fceu_hInstance, MAKEINTRESOURCE(INSERTCOMMENTSUBTITLE), main, (DLGPROC) InsertCommentSubtitleProc,(LPARAM) 0);
|
||||||
//string Subtitle = "1000 Poop";
|
|
||||||
//currMovieData.subtitles.push_back(Subtitle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InsertComment(HWND main)
|
void InsertComment(HWND main)
|
||||||
{
|
{
|
||||||
DialogBoxParam(fceu_hInstance, MAKEINTRESOURCE(INSERTCOMMENTSUBTITLE), main, (DLGPROC) InsertCommentSubtitleProc,(LPARAM) 1);
|
CommentSubtitle = true;
|
||||||
//wstring adelikat = mbstowcs("adelikat");
|
DialogBoxParam(fceu_hInstance, MAKEINTRESOURCE(INSERTCOMMENTSUBTITLE), main, (DLGPROC) InsertCommentSubtitleProc,(LPARAM) 0);
|
||||||
//currMovieData.comments.push_back(L"author " + adelikat);
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue