mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-19 09:11:41 +00:00
Fix scaling of Grabber cursor in RoE for non-4:3 resolutions (fix #637)
based on a fix from @dezo2 from the >60Hz support branch (TBH I don't know why the crosshair must be scaled to 4:3 but the grabber cursor not, but this works..)
This commit is contained in:
parent
ce4e6f076f
commit
a0b52bd700
2 changed files with 11 additions and 1 deletions
|
@ -14,13 +14,14 @@ Note: Numbers starting with a "#" like #330 refer to the bugreport with that num
|
|||
* Fixes for high-poly models (use heap allocation instead of `alloca()` for big buffers; #528)
|
||||
* Fix building dhewm3ded with newer OpenAL Soft headers (#633)
|
||||
* Better support for High-DPI mice:
|
||||
- Don't ignore mouse input on fast movement ("ridiculous mouse delta"), #616
|
||||
- Don't ignore mouse input on fast movement ("ridiculous mouse delta"; #616)
|
||||
- Allow setting sensitivity to values `< 1` in the dhewm3 settings menu to allow sane speeds
|
||||
for looking around with High-DPI mice (otherwise it might be way too fast)
|
||||
* Fix a crash (assertion) on start with ImGui if `SDL_GetWindowDisplayIndex()`
|
||||
or `SDL_GetDisplayDPI()` failed and the `imgui_scale` CVar was set to the default value of `-1`
|
||||
(setting it to `1` worked around the bug; #632)
|
||||
* Updated Dear ImGui to 1.91.4
|
||||
* Fix scaling of Grabber cursor in Resurrection of Evil in non-4:3 resolutions (#637)
|
||||
|
||||
1.5.4 (2024-08-03)
|
||||
------------------------------------------------------------------------
|
||||
|
|
|
@ -3228,13 +3228,22 @@ void idPlayer::DrawHUD( idUserInterface *_hud ) {
|
|||
if ( cursor && weapon.GetEntity()->ShowCrosshair() ) {
|
||||
|
||||
#ifdef _D3XP
|
||||
bool wantScaleTo43 = true; // DG: for fixing scaling of grabber cursor
|
||||
if ( weapon.GetEntity()->GetGrabberState() == 1 || weapon.GetEntity()->GetGrabberState() == 2 ) {
|
||||
cursor->SetStateString( "grabbercursor", "1" );
|
||||
cursor->SetStateString( "combatcursor", "0" );
|
||||
// DG: while the grabbercursor is active, the cursor must not be scaled because
|
||||
// (unlike with the regular crosshair) that distorts it when not using 4:3
|
||||
wantScaleTo43 = false;
|
||||
} else {
|
||||
cursor->SetStateString( "grabbercursor", "0" );
|
||||
cursor->SetStateString( "combatcursor", "1" );
|
||||
}
|
||||
// DG: update scaleto43 state if necessary
|
||||
if ( cursor->GetStateBool( "scaleto43" ) != wantScaleTo43 ) {
|
||||
cursor->SetStateBool( "scaleto43", wantScaleTo43 );
|
||||
cursor->StateChanged( gameLocal.realClientTime );
|
||||
}
|
||||
#endif
|
||||
|
||||
cursor->Redraw( gameLocal.realClientTime );
|
||||
|
|
Loading…
Reference in a new issue