Skip to content

fixed cursor hardcoded to refresh at 60fps #1758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ This page lists all the individual contributions to the project by their author.
- **Joshy** - Original FlyingStrings implementation
- **CnCVK** - Original custom locomotors experiment
- **ZΞPHYɌUS** - win/lose themes code
- **Fridge** - Cursor Fix code
- **Neargye (Daniil Goncharov)** - [nameof library](https://github.com/Neargye/nameof) (MIT)
- **ayylmao** - help with docs, extensive and thorough testing
- **SMxReaver** - help with docs, extensive and thorough testing
Expand Down
2 changes: 1 addition & 1 deletion YRpp
Submodule YRpp updated 5 files
+1 −1 HouseTypeClass.h
+1 −1 RulesClass.h
+1 −1 SessionClass.h
+18 −1 Unsorted.h
+1 −1 YRCom.h
2 changes: 1 addition & 1 deletion docs/User-Interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This page lists all user interface additions, changes, fixes that are implemente
- Fixed position and layer of info tip and reveal production cameo on selected building.
- Timer (superweapon, mission etc) blinking color scheme can be customized by setting `[AudioVisual] -> TimerBlinkColorScheme`. Defaults to third color scheme listed in `[Colors]`.
- Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold.

- Fixed cursor from being hardcoded to update/render 60 times a second no matter how fast the game is rendering. Now the Cursor will update and render much more frequently.
```{note}
You can use the improved vanilla font which can be found on [Phobos supplementaries repo](https://github.com/Phobos-developers/PhobosSupplementaries) which has way more Unicode character coverage than the default one.
```
Expand Down
2 changes: 1 addition & 1 deletion docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ Vanilla fixes:
- Fixed an issue that jumpjet harvester will overlap when manually entering refinery buildings and cause game crashes (by CrimRecya)
- Fixed an issue that `Spawned` aircraft will fly towards the edge of the map when its `Spawner` is under EMP (by CrimRecya)
- Projectiles with `Vertical=true` now drop straight down if fired off by AircraftTypes instead of behaving erratically (by Starkku)

- Fixed cursor from being hardcoded to update/render 60 times a second no matter how fast the game is rendering. Now the Cursor will update and render much more frequently (by Fridge)
Phobos fixes:
- Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi)
- `600 The shield of the attached object is broken` bug fix for the triggered event (by FlyStar)
Expand Down
12 changes: 12 additions & 0 deletions src/Misc/Hooks.BugFixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <HashTable.h>
#include <TunnelLocomotionClass.h>
#include <TacticalClass.h>
#include <Unsorted.h>

#include <Ext/Rules/Body.h>
#include <Ext/BuildingType/Body.h>
Expand Down Expand Up @@ -2279,3 +2280,14 @@ DEFINE_HOOK(0x415F25, AircraftClass_FireAt_Vertical, 0x6)

return 0;
}


//Jul 7, 2025 - Fridge: Cursor Refresh rate fix(from 60 to game render rate)
DEFINE_HOOK(0x7B8536, StartMouseThread_AdjustMouseInterval, 0xA)
{

// Original - Thread_Mouse_Args.Interval = 16ms
Game::MouseThread.Interval = 1;

return 0x7B8540;
}