\r
// Create the backbuffer surface\r
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;\r
- ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;\r
+ ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;\r
ddsd.dwWidth = EmuWidth;\r
ddsd.dwHeight = EmuHeight;\r
\r
dst = (int *)((char *)dst + sd.lPitch);\r
}\r
}\r
+ else if (sd.ddpfPixelFormat.dwRGBBitCount == 24) /* wine uses this for me */\r
+ {\r
+ void *dst = sd.lpSurface;\r
+ for (y = 0; y < EmuHeight; y++)\r
+ {\r
+ unsigned char *dst1 = (unsigned char *) dst;\r
+ for (x = 0; x < EmuWidth; x++, dst1 += 3)\r
+ {\r
+ int s = *ps++;\r
+ dst1[2] = (s&0xf800)>>8; dst1[1] = (s&0x07e0)>>3; dst1[0] = s<<3; // BGR\r
+ }\r
+ dst = (void *)((char *)dst + sd.lPitch);\r
+ }\r
+ }\r
else if (sd.ddpfPixelFormat.dwRGBBitCount == 16)\r
{\r
unsigned short *dst = (unsigned short *)sd.lpSurface;\r
int MainWidth=720,MainHeight=480;\r
\r
static HMENU mdisplay = 0;\r
+static unsigned char *rom_data = NULL;\r
\r
static void UpdateRect()\r
{\r
static void LoadROM(const char *cmdpath)\r
{\r
static char rompath[MAX_PATH] = { 0, };\r
- static unsigned char *rom_data = NULL;\r
unsigned char *rom_data_new = NULL;\r
unsigned int rom_size = 0;\r
pm_file *rom = NULL;\r
lock_to_1_1=0;\r
CheckMenuItem(mdisplay, 1104, MF_UNCHECKED);\r
}\r
- LoopWait=0;\r
+ if (rom_data != NULL) LoopWait=0;\r
return 0;\r
case 1104:\r
lock_to_1_1=!lock_to_1_1;\r
InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, (UINT_PTR) mfile, "&File");\r
InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, (UINT_PTR) mdisplay, "&Display");\r
// InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, 1200, "&Config");\r
- InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING|MF_POPUP, 1300, "&About");\r
+ InsertMenu(mmain, -1, MF_BYPOSITION|MF_STRING, 1300, "&About");\r
\r
// Create the window:\r
FrameWnd=CreateWindow(wc.lpszClassName,"PicoDrive " VERSION,style|WS_VISIBLE,\r