6d4a9e7076
because it caused screen corruption whenever Bochs changed resolution. (my setup = Win98, MSVC++)
59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
Removed from the CVS because it seems to cause win32 screen to be
|
|
corrupted after a resize.
|
|
-Bryce
|
|
Wed Mar 27 19:48:58 2002
|
|
|
|
|
|
|
|
--- win32-patch-removed.cc Wed Mar 27 19:53:06 2002
|
|
+++ win32.cc Wed Mar 27 19:55:06 2002
|
|
@@ -161,6 +161,25 @@
|
|
void bx_signal_handler(int);
|
|
#endif
|
|
|
|
+static int stored_x = 0;
|
|
+static int stored_y = 0;
|
|
+
|
|
+static void CreateMainBitmap (HWND hwnd, int x, int y)
|
|
+{
|
|
+ HDC hdc;
|
|
+ if ((stored_x != x) || (stored_y != y))
|
|
+ if (MemoryBitmap != NULL)
|
|
+ DeleteObject (MemoryBitmap);
|
|
+ hdc = GetDC(hwnd);
|
|
+ MemoryBitmap = CreateCompatibleBitmap(hdc, x, y);
|
|
+ stored_x = x;
|
|
+ stored_y = y;
|
|
+ MemoryDC = CreateCompatibleDC(hdc);
|
|
+ ReleaseDC(hwnd, hdc);
|
|
+}
|
|
+
|
|
+
|
|
+
|
|
static void processMouseXY( int x, int y, int windows_state, int implied_state_change)
|
|
{
|
|
int bx_state;
|
|
@@ -396,12 +415,7 @@
|
|
SetCursorPos(wndRect.left + stretched_x/2 + x_edge,
|
|
wndRect.top + stretched_y/2 + y_edge + y_caption);
|
|
cursorWarped();
|
|
-
|
|
- hdc = GetDC(stInfo.hwnd);
|
|
- MemoryBitmap = CreateCompatibleBitmap(hdc, BX_MAX_XRES, BX_MAX_YRES);
|
|
- MemoryDC = CreateCompatibleDC(hdc);
|
|
- ReleaseDC(stInfo.hwnd, hdc);
|
|
-
|
|
+ CreateMainBitmap (stInfo.hwnd, stretched_x, stretched_y);
|
|
if (MemoryBitmap && MemoryDC) {
|
|
stInfo.UIinited = TRUE;
|
|
|
|
@@ -897,6 +911,8 @@
|
|
stretched_y *= 2;
|
|
stretch_factor *= 2;
|
|
}
|
|
+
|
|
+ CreateMainBitmap(stInfo.hwnd, stretched_x, stretched_y);
|
|
|
|
FontId = 2;
|
|
yChar = 16;
|