From f5dfdead439a442f968e51ee3e74963025fdfcaa Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Mon, 5 Nov 2018 04:54:53 +0100 Subject: [PATCH] Do the cursor/crosshair scaling to 4:3 also when loading savegame --- neo/d3xp/Player.cpp | 6 ++++++ neo/game/Player.cpp | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/neo/d3xp/Player.cpp b/neo/d3xp/Player.cpp index 34956f38..966c49ec 100644 --- a/neo/d3xp/Player.cpp +++ b/neo/d3xp/Player.cpp @@ -2473,6 +2473,12 @@ void idPlayer::Restore( idRestoreGame *savefile ) { savefile->ReadInt( focusTime ); savefile->ReadObject( reinterpret_cast( focusVehicle ) ); savefile->ReadUserInterface( cursor ); + // DG: make it scale to 4:3 so crosshair looks properly round + // yes, like so many scaling-related things this is a bit hacky + // and note that this is special cased in StateChanged and you + // can *not* generally set windowDef properties like this. + cursor->SetStateBool("scaleto43", true); + cursor->StateChanged(gameLocal.time); // DG end savefile->ReadInt( oldMouseX ); savefile->ReadInt( oldMouseY ); diff --git a/neo/game/Player.cpp b/neo/game/Player.cpp index b8018182..8caaab4b 100644 --- a/neo/game/Player.cpp +++ b/neo/game/Player.cpp @@ -2033,6 +2033,13 @@ void idPlayer::Restore( idRestoreGame *savefile ) { savefile->ReadObject( reinterpret_cast( focusVehicle ) ); savefile->ReadUserInterface( cursor ); + // DG: make it scale to 4:3 so crosshair looks properly round + // yes, like so many scaling-related things this is a bit hacky + // and note that this is special cased in StateChanged and you + // can *not* generally set windowDef properties like this. + cursor->SetStateBool("scaleto43", true); + cursor->StateChanged(gameLocal.time); // DG end + savefile->ReadInt( oldMouseX ); savefile->ReadInt( oldMouseY );