summaryrefslogtreecommitdiffstats
path: root/board/MAI/bios_emulator/scitech/src/common/center.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/MAI/bios_emulator/scitech/src/common/center.c')
-rw-r--r--board/MAI/bios_emulator/scitech/src/common/center.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/board/MAI/bios_emulator/scitech/src/common/center.c b/board/MAI/bios_emulator/scitech/src/common/center.c
index 7eb368fd3a..68e17c2a94 100644
--- a/board/MAI/bios_emulator/scitech/src/common/center.c
+++ b/board/MAI/bios_emulator/scitech/src/common/center.c
@@ -60,19 +60,19 @@ void _EXPORT CenterWindow(HWND hWndCenter, HWND parent, BOOL repaint)
CenterY = ((RectParent.bottom - RectParent.top) - Height) / 2;
if ((CenterX < 0) || (CenterY < 0)) {
- /* The Center Window is smaller than the parent window. */
- if (hWndParent != GetDesktopWindow()) {
- /* If the parent window is not the desktop use the desktop size. */
- CenterX = (GetSystemMetrics(SM_CXSCREEN) - Width) / 2;
- CenterY = (GetSystemMetrics(SM_CYSCREEN) - Height) / 2;
- }
- CenterX = (CenterX < 0) ? 0: CenterX;
- CenterY = (CenterY < 0) ? 0: CenterY;
- }
+ /* The Center Window is smaller than the parent window. */
+ if (hWndParent != GetDesktopWindow()) {
+ /* If the parent window is not the desktop use the desktop size. */
+ CenterX = (GetSystemMetrics(SM_CXSCREEN) - Width) / 2;
+ CenterY = (GetSystemMetrics(SM_CYSCREEN) - Height) / 2;
+ }
+ CenterX = (CenterX < 0) ? 0: CenterX;
+ CenterY = (CenterY < 0) ? 0: CenterY;
+ }
else {
- CenterX += RectParent.left;
- CenterY += RectParent.top;
- }
+ CenterX += RectParent.left;
+ CenterY += RectParent.top;
+ }
/* Copy the values into RectCenter */
RectCenter.left = CenterX;
@@ -82,8 +82,8 @@ void _EXPORT CenterWindow(HWND hWndCenter, HWND parent, BOOL repaint)
/* Move the window to the new location */
MoveWindow(hWndCenter, RectCenter.left, RectCenter.top,
- (RectCenter.right - RectCenter.left),
- (RectCenter.bottom - RectCenter.top), repaint);
+ (RectCenter.right - RectCenter.left),
+ (RectCenter.bottom - RectCenter.top), repaint);
}
void _EXPORT CenterLogo(HWND hWndLogo, HWND hWndParent, int CenterY)
@@ -117,7 +117,6 @@ void _EXPORT CenterLogo(HWND hWndLogo, HWND hWndParent, int CenterY)
/* Move the window to the new location */
MoveWindow(hWndLogo, RectCenter.left, RectCenter.top,
- (RectCenter.right - RectCenter.left),
- (RectCenter.bottom - RectCenter.top), false);
+ (RectCenter.right - RectCenter.left),
+ (RectCenter.bottom - RectCenter.top), false);
}
-
OpenPOWER on IntegriCloud