aboutsummaryrefslogtreecommitdiff
path: root/wince/screen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wince/screen.cpp')
-rw-r--r--wince/screen.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/wince/screen.cpp b/wince/screen.cpp
index 894ee0b768..f7e88507e3 100644
--- a/wince/screen.cpp
+++ b/wince/screen.cpp
@@ -86,6 +86,9 @@ void palette_update();
static tCls pCls = NULL;
static tBlt pBlt = NULL;
+static int _geometry_w;
+static int _geometry_h;
+
HWND hWndMain;
@@ -133,9 +136,25 @@ void SetScreenGeometry(int w, int h) {
MessageBox(NULL, TEXT("Unsupported screen geometry !"), TEXT("Error"), MB_OK);
exit(1);
}
- geom[0].lineLimit = w*h;
- geom[1].lineLimit = w*h;
- geom[2].lineLimit = w*h;
+
+ _geometry_w = w;
+ _geometry_h = h;
+ RestoreScreenGeometry();
+}
+
+void LimitScreenGeometry() {
+
+ if (_geometry_h > 200) {
+ geom[0].lineLimit = _geometry_w*200;
+ geom[1].lineLimit = _geometry_w*200;
+ geom[1].lineLimit = _geometry_w*200;
+ }
+}
+
+void RestoreScreenGeometry() {
+ geom[0].lineLimit = _geometry_w * _geometry_h;
+ geom[1].lineLimit = _geometry_w * _geometry_h;
+ geom[2].lineLimit = _geometry_w * _geometry_h;
}
int GraphicsOn(HWND hWndMain_param)
@@ -1139,4 +1158,4 @@ void Translate(int* px, int* py)
}
}
-#endif \ No newline at end of file
+#endif