Left Mouse detection doesn't work?

More
5 years 4 months ago - 5 years 4 months ago #1 by Citizenkane Left Mouse detection doesn't work? was created by Citizenkane
For some reason, ReShade isn't detecting my left mouse button. All the other mouse buttons work fine.
According to REFERENCE.md, ReShade supports 6 mouse buttons (0-5), but I don't have enough mouse buttons to test the last one.

The problem is also mentioned here , but there were no replies. Is this a known issue? Has anybody else had this problem?

How I tested. Pretty straightforward. Pressing mouse buttons changes the color of the entire screen.
I tested using Vampire: the Masquerade - Bloodlines.
uniform bool bLeftMouseToggle <source="mousebutton"; keycode=0; toggle=true;>;		//Doesn't work
uniform bool bRightMouseToggle <source="mousebutton"; keycode=1; toggle=true;>;		 //Works
uniform bool bMiddleMouseToggle <source="mousebutton"; keycode=2; toggle=true;>;	//Works
uniform bool bMouse4Toggle <source="mousebutton"; keycode=3; toggle=true;>;		//Works
uniform bool bMouse5Toggle <source="mousebutton"; keycode=4; toggle=true;>;		//Works

float4 TestPS(float4 pos : SV_Position, float2 uv : TEXCOORD) : SV_Target {	
	float3 currentColor;
	if( bLeftMouseToggle ){
		currentColor = float3(1.0, 0.0, 0.0); //Red
	} else if( bRightMouseToggle ){
		currentColor = float3(0.0, 1.0, 0.0); //Green
	} else if( bMiddleMouseToggle ){
		currentColor = float3(0.0, 0.0, 1.0); //Blue
	} else if( bMouse4Toggle ){
		currentColor = float3(0.0, 1.0, 1.0); //Cyan
	} else if( bMouse5Toggle ){
		currentColor = float3(1.0, 0.0, 1.0); //Magenta
	}
	return float4(currentColor, 1.0);
}
Last edit: 5 years 4 months ago by Citizenkane. Reason: typo

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

More
5 years 4 months ago #2 by crosire Replied by crosire on topic Left Mouse detection doesn't work?
That's a bug. A pretty stupid one at that. ReShade checks if the keycode falls in the range [0,5[. Only the check was done like this until now: "keycode > 0 && keycode < 5", which fails for the left mouse button.
By the way, the reference is wrong too, only 5 mouse buttons are supported. Will fix that too.
The following user(s) said Thank You: Citizenkane

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

More
5 years 4 months ago - 5 years 4 months ago #3 by Citizenkane Replied by Citizenkane on topic Left Mouse detection doesn't work?
Hey, thanks for the quick reply! No worries about the bug, I'm glad to know it's been fixed.

Any ETA on the next release? I've been working on a shader that does some stuff on mouse click, which I hope to release once a new version is up. I know the last version was fairly recent though, so I imagine you'll want to wait and bundle a bunch of changes into one patch. :)
Last edit: 5 years 4 months ago by Citizenkane.

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

More
5 years 4 months ago #4 by crosire Replied by crosire on topic Left Mouse detection doesn't work?
Yeah, there have been two changes since the last release so far. Could publish a hotfix sometime soon though.
The following user(s) said Thank You: Citizenkane

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

More
5 years 4 months ago #5 by Citizenkane Replied by Citizenkane on topic Left Mouse detection doesn't work?
That'd be great! :lol:

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

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.