frame advance improvements in sdl
This commit is contained in:
parent
b6edc72bc8
commit
aa0923a3a8
|
@ -334,12 +334,23 @@ KeyboardCommands()
|
|||
}
|
||||
|
||||
g_config->getOption("SDL.Hotkeys.FrameAdvance", &key);
|
||||
if(_keyonly(key)) {
|
||||
// 8-10-08 - this freezes fceux for me - punkrockguy318
|
||||
static bool frameAdvancing = false;
|
||||
if(g_keyState[key])
|
||||
{
|
||||
if(frameAdvancing == false)
|
||||
{
|
||||
FCEUI_FrameAdvance();
|
||||
frameAdvancing = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(frameAdvancing)
|
||||
{
|
||||
FCEUI_FrameAdvanceEnd();
|
||||
frameAdvancing = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
g_config->getOption("SDL.Hotkeys.Reset", &key);
|
||||
if(_keyonly(key)) {
|
||||
|
|
|
@ -149,6 +149,8 @@ void
|
|||
WriteSound(int32 *buf,
|
||||
int Count)
|
||||
{
|
||||
extern int EmulationPaused;
|
||||
if (EmulationPaused == 0)
|
||||
while(Count) {
|
||||
while(s_BufferIn == s_BufferSize) {
|
||||
SDL_Delay(1);
|
||||
|
|
Loading…
Reference in New Issue