At least make OS/2 paint a picture on the screen until we can get the rendering sorted out...

This commit is contained in:
David Schmidt 2010-06-11 11:54:33 +00:00
parent bebb4c2c39
commit d6f4fb2865
4 changed files with 18 additions and 3 deletions

BIN
src/arch/os2/gsportos2.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 KiB

View File

@ -39,4 +39,6 @@ VOID os2_abort(HWND hwndFrame, HWND hwndClient);
#define IDS_HELLO 262
#define IDS_1 263
#define IDS_2 264
#define IDS_3 265
#define IDS_3 265
#define ID_BITMAP 266 /* For testing backgrounds - can be removed once video works */

View File

@ -24,6 +24,8 @@
ICON ID_WINDOW gsportos2.ico
BITMAP ID_BITMAP gsportos2.bmp
MENU ID_WINDOW PRELOAD
BEGIN
SUBMENU "~Options", ID_OPTIONS

View File

@ -428,7 +428,7 @@ x_push_kimage(Kimage *kimage_ptr, int destx, int desty, int srcx, int srcy,
{
RECTL rc;
POINTL pt[4];
HBITMAP hbmOld;
HBITMAP hbmOld, hbmNew;
char *szString = "Hello, world!\0";
@ -442,9 +442,21 @@ x_push_kimage(Kimage *kimage_ptr, int destx, int desty, int srcx, int srcy,
pt[3].x = srcx+width;
pt[3].y = srcy+height;
if (width == 560)
{
/* Paint a known-good bitmap until we can figure out why images aren't showing up */
hbmNew = GpiLoadBitmap(g_hps_memory,NULLHANDLE,ID_BITMAP,560,400);
hbmOld = GpiSetBitmap(g_hps_memory, hbmNew);
GpiBitBlt(g_hps_screen,g_hps_memory,4L,pt,ROP_SRCCOPY, BBO_IGNORE);
GpiSetBitmap(g_hps_memory, hbmOld);
GpiDeleteBitmap(hbmNew);
}
else
{
hbmOld = GpiSetBitmap(g_hps_memory, (HBITMAP)kimage_ptr->dev_handle);
GpiBitBlt(g_hps_screen,g_hps_memory,4L,pt,ROP_SRCCOPY, BBO_IGNORE);
GpiSetBitmap(g_hps_memory, hbmOld);
}
}
@ -528,4 +540,3 @@ os2_abort(HWND g_hwnd_frame, HWND g_hwnd_client)
{
exit(-1);
}