windows-2048 / The-Fastest-Mouse-Clicker-for-Windows

Free and fast, open source, full-featured, statically-linked mouse auto clicker for Windows written in vanilla C++. Uses hardware-limited arrayed Win32 SendInput() calls to reach up to 100000 clicks/s. Supports command line, random clicks and sequences of clicks. 2024 is the project's 8th ANNIVERSARY.
https://windows-2048.github.io/The-Fastest-Mouse-Clicker-for-Windows/
GNU General Public License v3.0
157 stars 31 forks source link

Font size is ridiculously large #16

Open SanderBouwhuis opened 2 years ago

SanderBouwhuis commented 2 years ago

I upgraded from v2.4.x to v2.6.1.0 and now the GUI is all messed up. The fonts are extremely large! The window is 900x900 and takes up most of the screen where before the window would be nice and small. Also, the font is extremely large. How can we change the font size?

Comparison

windows-2048 commented 2 years ago

Did you touch c:\path\to\TheFastestMouseClicker.exe - Right Click -> Properties -> Compatibility -> Change High DPI Setings? You may play with that properties to fix your problem on Windows 10.

Or do you use Windows pior to Windows 7, like XP ir Vista? TheFastestMouseClicker.exe has built-in XML manifest to prevent large fonts and window sizes. But that manifest doesn't work on Windows XP or Vista. I support only Windows 7, 8.1 and 10 (and possibly 11).

Let me know what OS version do you use and whether you could fix the issue!

SanderBouwhuis commented 2 years ago

I did not change any settings beforehand. I went into properties and changed all the Change High DPI Settings one by one. None of them changed anything.

I am on Windows 10 English x64.

I cannot fix the issue.

SanderBouwhuis commented 2 years ago

Ok, I looked at the source and found your bug:

main.cpp on line 829:

struct _Sc
{
    int factor;
    _Sc() : factor(1)
    {
        int h, v;
        GetDesktopResolution(h, v);
        if (v > 1440)
            factor = 2; // Here is the bug. DON'T set a factor because Windows will handle the scaling correctly nowadays.
    }
} _sc;

int Sc(int x)
{
    return x * _sc.factor;
}

So, you don't need the _Sc structure and you don't need the Sc() function. Just always use factor = 1.

Remove this:

struct _Sc
{
    int factor;
    _Sc() : factor(1)
    {
        int h, v;
        GetDesktopResolution(h, v);
        if (v > 1440)
            factor = 2; // Here is the bug. DON'T set a factor because Windows will handle the scaling correctly nowadays.
    }
} _sc;

int Sc(int x)
{
  // return x * _sc.factor; 

  // Just always return x here. No scaling factor needed.
  return x;
}

I don't know how to submit a pull request for you (never done that). If you tell me how, I'll do that. I'm also going to try to fix the bug where after pressing the toggle key, there is no clicking and I cannot move the mouse.

windows-2048 commented 2 years ago

Thank you a lot for a fix. I'll incorporate it into new version.