PDA

View Full Version : CenterWindow bug fix



neojzs
05-17-2012, 11:13 AM
in windows mode

log file

Setting native video mode to 800, 480 - Fullscreen: 0 Aspect Ratio: 0.00
Setting screen info to 800, 480, mode 1. Original is 800, 480
:
:
Unloading 3 (interface/summary_bg.rttex)
Setting native video mode to 800, 479 - Fullscreen: 0 Aspect Ratio: 0.00
Setting screen info to 800, 479, mode 1. Original is 800, 479
Entering foreground

windows size changed 800,480 -> 800,479

How to fix
in CenterWindow function
SetWindowPos(hWnd, NULL, wb - wa, hb - ha, wa*2, ha*2, 0);
=>SetWindowPos(hWnd, NULL, wb - wa, hb - ha, r.right - r.left, r.bottom - r.top, 0);

Seth
05-23-2012, 06:01 AM
in windows mode

log file

Setting native video mode to 800, 480 - Fullscreen: 0 Aspect Ratio: 0.00
Setting screen info to 800, 480, mode 1. Original is 800, 480
:
:
Unloading 3 (interface/summary_bg.rttex)
Setting native video mode to 800, 479 - Fullscreen: 0 Aspect Ratio: 0.00
Setting screen info to 800, 479, mode 1. Original is 800, 479
Entering foreground

windows size changed 800,480 -> 800,479

How to fix
in CenterWindow function
SetWindowPos(hWnd, NULL, wb - wa, hb - ha, wa*2, ha*2, 0);
=>SetWindowPos(hWnd, NULL, wb - wa, hb - ha, r.right - r.left, r.bottom - r.top, 0);

Thanks, will add!