pause after playback
This commit is contained in:
parent
e471ef6f53
commit
307bf9c819
|
@ -359,6 +359,9 @@ void FCEUD_UpdateNTView(int scanline, int drawall);
|
|||
///the driver might should update its PPUView (only used if debugging support is compiled in)
|
||||
void FCEUD_UpdatePPUView(int scanline, int drawall);
|
||||
|
||||
///I am dissatisfied with this method of getting an option from the driver to the core. but that is what we're using for now
|
||||
bool FCEUD_PauseAfterPlayback();
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
|
|
|
@ -41,6 +41,7 @@ extern int frame_display;
|
|||
extern int input_display;
|
||||
extern char *BasicBotDir;
|
||||
extern int allowUDLR;
|
||||
extern int pauseAfterPlayback;
|
||||
|
||||
//window positions:
|
||||
extern int ChtPosX,ChtPosY;
|
||||
|
@ -199,6 +200,8 @@ static CFGSTRUCT fceuconfig[] = {
|
|||
AC(GGConv_wndx),
|
||||
AC(GGConv_wndy),
|
||||
|
||||
AC(pauseAfterPlayback),
|
||||
|
||||
//ACS(memwLastfile[2048]),
|
||||
ENDCFGSTRUCT
|
||||
};
|
||||
|
|
|
@ -1201,3 +1201,4 @@ void FCEUD_ToggleStatusIcon(void)
|
|||
status_icon = !status_icon;
|
||||
UpdateCheckedMenuItems();
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -330,6 +330,8 @@
|
|||
#define MENU_LOG_SOUND 40120
|
||||
#define ID_TOOLS_TASEDIT 40123
|
||||
#define MENU_TASEDIT 40124
|
||||
#define ID_CONFIG_PAUSEAFTERPLAYBACK 40125
|
||||
#define MENU_PAUSEAFTERPLAYBACK 40126
|
||||
#define MW_ValueLabel2 65423
|
||||
#define MW_ValueLabel1 65426
|
||||
#define GUI_BOT_DEBUG 65436
|
||||
|
@ -341,7 +343,7 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 110
|
||||
#define _APS_NEXT_COMMAND_VALUE 40125
|
||||
#define _APS_NEXT_COMMAND_VALUE 40127
|
||||
#define _APS_NEXT_CONTROL_VALUE 1131
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
#include "common.h"
|
||||
#include "tasedit.h"
|
||||
#include "../../fceu.h"
|
||||
|
||||
HWND hTasEdit = 0;
|
||||
|
||||
void KillTasEdit()
|
||||
{
|
||||
DestroyWindow(hTasEdit);
|
||||
hTasEdit = 0;
|
||||
}
|
||||
|
||||
BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
break;
|
||||
case WM_CLOSE:
|
||||
case WM_QUIT:
|
||||
KillTasEdit();
|
||||
|
||||
/* case WM_NOTIFY:
|
||||
case LVN_GETDISPINFO:*/
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void DoTasEdit()
|
||||
{
|
||||
if(!hTasEdit)
|
||||
hTasEdit = CreateDialog(fceu_hInstance,"TASEDIT",NULL,WndprocTasEdit);
|
||||
|
||||
if(hTasEdit)
|
||||
{
|
||||
SetWindowPos(hTasEdit,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER);
|
||||
//update?
|
||||
//FCEUD_UpdatePPUView(-1,1);
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
void DoTasEdit();
|
|
@ -45,6 +45,7 @@
|
|||
#include "basicbot.h"
|
||||
#include "throttle.h"
|
||||
#include "monitor.h"
|
||||
#include "tasedit.h"
|
||||
|
||||
#include "guiconfig.h"
|
||||
#include "timing.h"
|
||||
|
@ -74,6 +75,7 @@ void DoPPUView();//mbg merge 7/19/06 yech had to add
|
|||
void MapInput(void);
|
||||
|
||||
// Internal variables
|
||||
int pauseAfterPlayback = 0;
|
||||
|
||||
// Contains recent file strings
|
||||
char *recent_files[] = { 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };
|
||||
|
@ -189,6 +191,7 @@ void UpdateCheckedMenuItems()
|
|||
CheckMenuItem(fceumenu, polo2[x], *polo[x] ? MF_CHECKED : MF_UNCHECKED);
|
||||
}
|
||||
|
||||
CheckMenuItem(fceumenu, MENU_PAUSEAFTERPLAYBACK, pauseAfterPlayback ? MF_CHECKED : MF_UNCHECKED);
|
||||
CheckMenuItem(fceumenu, MENU_RUN_IN_BACKGROUND, eoptions & EO_BGRUN ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
CheckMenuItem(fceumenu, 40003, FCEU_BotMode() ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
@ -855,6 +858,10 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
UpdateCheckedMenuItems();
|
||||
break;
|
||||
|
||||
case MENU_TASEDIT:
|
||||
DoTasEdit();
|
||||
break;
|
||||
|
||||
case MENU_EXTERNAL_INPUT:
|
||||
// TODO: ???
|
||||
break;
|
||||
|
@ -864,6 +871,11 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
ToggleHideMenu();
|
||||
break;
|
||||
|
||||
case MENU_PAUSEAFTERPLAYBACK:
|
||||
pauseAfterPlayback = pauseAfterPlayback?0:1;
|
||||
UpdateCheckedMenuItems();
|
||||
break;
|
||||
|
||||
case MENU_RUN_IN_BACKGROUND:
|
||||
// Run in Background menu was selected
|
||||
// TODO: Does this even work?
|
||||
|
@ -1498,3 +1510,7 @@ void FCEUD_CmdOpen(void)
|
|||
LoadNewGamey(hAppWnd, 0);
|
||||
}
|
||||
|
||||
bool FCEUD_PauseAfterPlayback()
|
||||
{
|
||||
return pauseAfterPlayback!=0;
|
||||
}
|
|
@ -589,6 +589,11 @@ void FCEUMOV_AddJoy(uint8 *js, int SkipFlush)
|
|||
if(currFrameCounter == currMovieData.records.size())
|
||||
{
|
||||
StopPlayback();
|
||||
if(FCEUD_PauseAfterPlayback())
|
||||
{
|
||||
FCEUI_ToggleEmulationPause();
|
||||
FCEU_DispMessage("Paused after playback");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -830,6 +835,7 @@ int FCEUI_MovieGetInfo(const char* fname, MOVIE_INFO* info)
|
|||
info->md5_of_rom_used_present = 1;
|
||||
info->emu_version_used = md.emuVersion;
|
||||
info->name_of_rom_used = md.romFilename;
|
||||
info->rerecord_count = md.recordCount;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1149,6 +1149,14 @@
|
|||
RelativePath="..\src\drivers\win\state.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\drivers\win\tasedit.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\drivers\win\tasedit.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\drivers\win\throttle.cpp"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue