[SOLVED] Keydown event times out when another key is pressed

  • brussell
  • Topic Author
More
4 years 2 months ago - 4 years 2 months ago #1 by brussell [Bug] Keydown event times out when another key is pressed was created by brussell
I thought it would be better to make a dedicated thread about the problem I posted here: reshade.me/forum/general-discussion/6265...holding-button#37908

So, let's use this example ReShade.fx:
uniform bool Keyboard_F <source = "key"; keycode = 0x46; >;

void VS(in uint id : SV_VertexID, out float4 position : SV_Position, out float2 texcoord : TEXCOORD)
{
    texcoord.x = (id == 2) ? 2.0 : 0.0;
    texcoord.y = (id == 1) ? 2.0 : 0.0;
    position = float4(texcoord * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0);
}

float4 PS(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
    float4 color = 0.5;
    
    if (Keyboard_F) { color = 0.0; }

    return color;
}

technique test < enabled = 1; >
{
    pass 
    {
        VertexShader = VS;
        PixelShader = PS;
    }
}

The screen is grey. Holding the F key turns it black. This is the correct behavior.
But as soon as some other key is pressed while holding F, the keydown event for F times out after a few seconds and the image goes back to grey. This should not be the case.

The issue was introduced with this commit: github.com/crosire/reshade/commit/4dbb89...716f67ab4abe50fe9dac

ps: I just saw this new commit: github.com/crosire/reshade/commit/e68672...42e5853f6ff0876f5dd6
Does it has something to do with this issue?
Last edit: 4 years 2 months ago by brussell.

Please Log in or Create an account to join the conversation.

  • crosire
More
4 years 2 months ago #2 by crosire Replied by crosire on topic [Bug] Keydown event times out when another key is pressed
The following user(s) said Thank You: brussell

Please Log in or Create an account to join the conversation.