summaryrefslogtreecommitdiff
path: root/board/MAI/bios_emulator/scitech/src/common/center.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /board/MAI/bios_emulator/scitech/src/common/center.c
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
* Code cleanup:LABEL_2003_06_27_2340
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
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);
}
-