[GH-ISSUE #4149] (windows ?)save state bug #1686

Closed
opened 2026-03-18 02:33:00 +03:00 by kerem · 10 comments
Owner

Originally created by @sum2012 on GitHub (Oct 13, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/4149

Press right button (in keybaord) while save state,
After load save state ,game will auto move to right(cannot control).
Same problem as "top","left","bottom" key

Originally created by @sum2012 on GitHub (Oct 13, 2013). Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/4149 Press right button (in keybaord) while save state, After load save state ,game will auto move to right(cannot control). Same problem as "top","left","bottom" key
kerem closed this issue 2026-03-18 02:33:05 +03:00
Author
Owner

@mr-chya commented on GitHub (Oct 13, 2013):

That's not exactly right. You can press F2 while holding down a key when creating a save state without having any problems. With that said if you are holding down a key on the keyboard and press select the key will get "stuck" in the emulator. What's more if you create a save state wile the button is stuck it will be saved that way.

<!-- gh-comment-id:26212756 --> @mr-chya commented on GitHub (Oct 13, 2013): That's not exactly right. You can press F2 while holding down a key when creating a save state without having any problems. With that said if you are holding down a key on the keyboard and press select the key will get "stuck" in the emulator. What's more if you create a save state wile the button is stuck it will be saved that way.
Author
Owner

@papel commented on GitHub (Nov 3, 2013):

It happens with me since the first version that I used.
If I save the state while a key is pressed and load this state, it will behave like when the key is pressed. It is solved by pressing and unpressing this key again.
It happens because the key state was saved as pressed and when it was loaded, no key-release event was sent.

This bug could be fixed by checking the key state when loading a state, if the key state is pressed and the mapped key is unpressed, it could send the key-release event.
It may be difficult when multiple key mappings are in use.

It is related with key state. https://github.com/hrydgard/ppsspp/issues/3077 may be related.

<!-- gh-comment-id:27648806 --> @papel commented on GitHub (Nov 3, 2013): It happens with me since the first version that I used. If I save the state while a key is pressed and load this state, it will behave like when the key is pressed. It is solved by pressing and unpressing this key again. It happens because the key state was saved as pressed and when it was loaded, no key-release event was sent. This bug could be fixed by checking the key state when loading a state, if the key state is pressed and the mapped key is unpressed, it could send the key-release event. It may be difficult when multiple key mappings are in use. It is related with key state. https://github.com/hrydgard/ppsspp/issues/3077 may be related.
Author
Owner

@sum2012 commented on GitHub (Nov 20, 2013):

@unknownbrackets Another save state bug
While I am pressing I (or J,K,L) ,I make a save status,
the player would auto move.
Test on Musou Orochi 2 Special
ppsspp-v0.9.5-545-ga151abf-windows-x86

<!-- gh-comment-id:28901134 --> @sum2012 commented on GitHub (Nov 20, 2013): @unknownbrackets Another save state bug While I am pressing I (or J,K,L) ,I make a save status, the player would auto move. Test on Musou Orochi 2 Special ppsspp-v0.9.5-545-ga151abf-windows-x86
Author
Owner

@unknownbrackets commented on GitHub (Nov 20, 2013):

I'm not able to reproduce that in other games. When loading a state it is similar to you immediately releasing the stick now.

-[Unknown]

<!-- gh-comment-id:28910674 --> @unknownbrackets commented on GitHub (Nov 20, 2013): I'm not able to reproduce that in other games. When loading a state it is similar to you immediately releasing the stick now. -[Unknown]
Author
Owner

@sum2012 commented on GitHub (Nov 20, 2013):

I mean only save state (Press Esc to save)

<!-- gh-comment-id:28935789 --> @sum2012 commented on GitHub (Nov 20, 2013): I mean only save state (Press Esc to save)
Author
Owner

@sum2012 commented on GitHub (Nov 20, 2013):

Sorry ,I re-test , Press Esc key can reproduce it (No need save state )

<!-- gh-comment-id:28937593 --> @sum2012 commented on GitHub (Nov 20, 2013): Sorry ,I re-test , Press Esc key can reproduce it (No need save state )
Author
Owner

@sum2012 commented on GitHub (Nov 20, 2013):

    if (msg.message == WM_KEYDOWN)
    {
        if (msg.wParam == VK_ESCAPE)

I don't know program key-release event

<!-- gh-comment-id:28944503 --> @sum2012 commented on GitHub (Nov 20, 2013): ``` if (msg.message == WM_KEYDOWN) { if (msg.wParam == VK_ESCAPE) ``` I don't know program key-release event
Author
Owner

@sum2012 commented on GitHub (Nov 20, 2013):

I take a search key-release event
keybd_event( VK_NUMLOCK,0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);

but combine the above code don't work

<!-- gh-comment-id:28945149 --> @sum2012 commented on GitHub (Nov 20, 2013): I take a search key-release event keybd_event( VK_NUMLOCK,0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0); but combine the above code don't work
Author
Owner

@unknownbrackets commented on GitHub (Nov 21, 2013):

Well, that's a problem where the UI dialogs don't send button presses to sceCtrl when they are focused (including key releases.)

-[Unknown]

<!-- gh-comment-id:28960622 --> @unknownbrackets commented on GitHub (Nov 21, 2013): Well, that's a problem where the UI dialogs don't send button presses to sceCtrl when they are focused (including key releases.) -[Unknown]
Author
Owner

@sum2012 commented on GitHub (Nov 21, 2013):

@unknownbrackets Thanks your tip
Unluck I come back home too late.
My code remain a little change

for (MSG msg; GetMessage(&msg, NULL, 0, 0); )   // for no quit
{
    if (msg.wParam == VK_ESCAPE)
    {
     __CtrlButtonDown(CTRL_UP);
     __CtrlButtonDown(CTRL_DOWN);
     __CtrlButtonDown(CTRL_LEFT);
     __CtrlButtonDown(CTRL_RIGHT);
     __CtrlSetAnalogX(0,0);
     __CtrlSetAnalogY(0,0);
                 }
<!-- gh-comment-id:29004278 --> @sum2012 commented on GitHub (Nov 21, 2013): @unknownbrackets Thanks your tip Unluck I come back home too late. My code remain a little change ``` for (MSG msg; GetMessage(&msg, NULL, 0, 0); ) // for no quit { if (msg.wParam == VK_ESCAPE) { __CtrlButtonDown(CTRL_UP); __CtrlButtonDown(CTRL_DOWN); __CtrlButtonDown(CTRL_LEFT); __CtrlButtonDown(CTRL_RIGHT); __CtrlSetAnalogX(0,0); __CtrlSetAnalogY(0,0); } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ppsspp#1686
No description provided.