win32: fix some frame advance bugs. also maybe fix hotkey mushiness
This commit is contained in:
parent
5676772a6c
commit
689d9a94df
|
@ -356,12 +356,17 @@ VOID CALLBACK KeyInputTimer( UINT idEvent, UINT uMsg, DWORD_PTR dwUser, DWORD_PT
|
||||||
{
|
{
|
||||||
if(joyState[i] < ULONG_MAX) // 0xffffffffUL
|
if(joyState[i] < ULONG_MAX) // 0xffffffffUL
|
||||||
joyState[i]++;
|
joyState[i]++;
|
||||||
if(joyState[i] == 1 || joyState[i] >= (unsigned) KeyInDelayInCount) {
|
if(joyState[i] == 1 || joyState[i] == (unsigned) KeyInDelayInCount) {
|
||||||
|
|
||||||
|
|
||||||
|
//HEY HEY HEY! this only repeats once. this is what it needs to be like for frame advance.
|
||||||
|
//if anyone wants a different kind of repeat, then the whole setup will need to be redone
|
||||||
|
|
||||||
//sort of fix the auto repeating
|
//sort of fix the auto repeating
|
||||||
//TODO find something better
|
//TODO find something better
|
||||||
// repeattime++;
|
// repeattime++;
|
||||||
// if(repeattime % 10 == 0) {
|
// if(repeattime % 10 == 0) {
|
||||||
joyState[i] = 1;
|
//printf("trigger %d\n",i);
|
||||||
PostMessage(MainWindow->getHWnd(), WM_CUSTKEYDOWN, (WPARAM)(i),(LPARAM)(NULL));
|
PostMessage(MainWindow->getHWnd(), WM_CUSTKEYDOWN, (WPARAM)(i),(LPARAM)(NULL));
|
||||||
repeattime=0;
|
repeattime=0;
|
||||||
// }
|
// }
|
||||||
|
@ -1063,7 +1068,6 @@ DWORD WINAPI run()
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FastForward) {
|
if(FastForward) {
|
||||||
|
|
||||||
if(framesskipped < 9)
|
if(framesskipped < 9)
|
||||||
{
|
{
|
||||||
skipnextframe = 1;
|
skipnextframe = 1;
|
||||||
|
@ -2381,18 +2385,28 @@ bool first;
|
||||||
void FrameAdvance(bool state)
|
void FrameAdvance(bool state)
|
||||||
{
|
{
|
||||||
if(state) {
|
if(state) {
|
||||||
if(first) {
|
if(emu_paused)
|
||||||
frameAdvance=true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
execute = TRUE;
|
execute = TRUE;
|
||||||
first=false;
|
else
|
||||||
}
|
if(first) {
|
||||||
|
execute = TRUE;
|
||||||
|
frameAdvance=true;
|
||||||
|
first=false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
execute = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
emu_halt();
|
first = true;
|
||||||
SPU_Pause(1);
|
if(frameAdvance)
|
||||||
emu_paused = 1;
|
{}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
emu_halt();
|
||||||
|
SPU_Pause(1);
|
||||||
|
emu_paused = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue