Ignore:
Timestamp:
Sep 15, 2024, 1:31:30 PM (4 days ago)
Author:
chronos
Message:
  • Fixed: City screen rename right mouse click didn't work on Windows due to window title are. Change to behave the same way as on Linux.
  • Fixed: Allow full screen switching in editor and movie mode.
  • Modified: Precalculate scaling coefficients also for from native values conversions for faster speed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/DpiControls/Dpi.Common.pas

    r608 r617  
    225225function ScaleToNative(Value: Integer): Integer; inline;
    226226begin
    227   Result := ScreenInfo.Lookup[Value];
     227  Result := ScreenInfo.LookupToNative[Value];
    228228  // Round and Trunc are fast. Ceil and Floor are slow.
    229229  // Without lookup table we would use:
     
    238238function ScaleFromNative(Value: Integer): Integer;
    239239begin
    240   Result := Trunc(Value * ScreenInfo.FromNative);
     240  Result := ScreenInfo.LookupFromNative[Value];
     241  // Round and Trunc are fast. Ceil and Floor are slow.
     242  // Without lookup table we would use:
     243  // Result := Floor(Value * ScreenInfo.FromNative);
    241244end;
    242245
Note: See TracChangeset for help on using the changeset viewer.