From 57d011453f77ae6ecc9e6a051ea66b76484fcb8e Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 28 Jun 2008 13:04:40 +0300 Subject: [PATCH] imported winuaesrc1510b3.zip --- cfgfile.c | 19 +++--- custom.c | 6 +- od-win32/dinput.c | 20 ++++-- od-win32/direct3d.c | 14 +++++ od-win32/direct3d.h | 1 + od-win32/dxwrap.c | 72 +++++++++------------ od-win32/picasso96_win.c | 5 ++ od-win32/picasso96_win.h | 1 + od-win32/win32.c | 44 ++++++++----- od-win32/win32.h | 4 +- od-win32/win32gfx.c | 118 ++++++++++++++++++++++++----------- od-win32/win32gui.c | 93 ++++++++++++++++----------- od-win32/winuaechangelog.txt | 26 +++++++- 13 files changed, 271 insertions(+), 152 deletions(-) diff --git a/cfgfile.c b/cfgfile.c index f110730b..41f08406 100755 --- a/cfgfile.c +++ b/cfgfile.c @@ -1878,9 +1878,9 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real, if (real) { cfgfile_parse_separated_line (p, line1b, line2b, askedtype); } else { - cfgfile_string (line1b, line2b, "config_description", p->description, 128); - cfgfile_string (line1b, line2b, "config_hardware_path", p->config_hardware_path, 128); - cfgfile_string (line1b, line2b, "config_host_path", p->config_host_path, 128); + cfgfile_string (line1b, line2b, "config_description", p->description, sizeof p->description); + cfgfile_string (line1b, line2b, "config_hardware_path", p->config_hardware_path, sizeof p->config_hardware_path); + cfgfile_string (line1b, line2b, "config_host_path", p->config_host_path, sizeof p->config_host_path); } } } @@ -1972,6 +1972,7 @@ int cfgfile_get_description (const char *filename, char *description, char *host { int result = 0; struct uae_prefs *p = xmalloc (sizeof (struct uae_prefs)); + p->description[0] = 0; p->config_host_path[0] = 0; p->config_hardware_path[0] = 0; @@ -1984,7 +1985,7 @@ int cfgfile_get_description (const char *filename, char *description, char *host if (hardwarelink) strcpy (hardwarelink, p->config_hardware_path); } - free (p); + xfree (p); return result; } @@ -2723,7 +2724,7 @@ uae_u8 *restore_configuration (uae_u8 *src) return src; } -uae_u8 *save_configuration(int *len) +uae_u8 *save_configuration (int *len) { int tmpsize = 30000; uae_u8 *dstbak, *dst; @@ -2739,12 +2740,12 @@ uae_u8 *save_configuration(int *len) ret = cfgfile_modify (index, "*", 1, tmpout, sizeof (tmpout)); index++; if (strlen(tmpout) > 0) { - if (!memcmp(tmpout, "input.", 6)) + if (!memcmp (tmpout, "input.", 6)) continue; strcpy (p, tmpout); strcat (p, "\n"); - p += strlen(p); - if (p - dstbak >= tmpsize - sizeof(tmpout)) + p += strlen (p); + if (p - dstbak >= tmpsize - sizeof (tmpout)) break; } if (ret >= 0) @@ -3023,7 +3024,7 @@ void default_prefs (struct uae_prefs *p, int type) zfile_fclose (default_file); default_file = NULL; - f = zfile_fopen_empty ("configstore", 50000); + f = zfile_fopen_empty ("configstore", 100000); if (f) { uaeconfig++; cfgfile_save_options (f, p, 0); diff --git a/custom.c b/custom.c index 6f576542..6400a2b7 100755 --- a/custom.c +++ b/custom.c @@ -2331,12 +2331,14 @@ void compute_vsynctime (void) vsynctime = vsynctime_orig = 1; else vsynctime = vsynctime_orig = syncbase / fake_vblank_hz; + if (!picasso_on) { #ifdef OPENGL - OGL_refresh (); + OGL_refresh (); #endif #ifdef D3D - D3D_refresh (); + D3D_refresh (); #endif + } if (currprefs.produce_sound > 1) update_sound (fake_vblank_hz); } diff --git a/od-win32/dinput.c b/od-win32/dinput.c index 93ed8bef..414065f0 100755 --- a/od-win32/dinput.c +++ b/od-win32/dinput.c @@ -783,11 +783,16 @@ static BOOL CALLBACK EnumObjectsCallback (const DIDEVICEOBJECTINSTANCE* pdidoi, int i; char tmp[100]; +#if 0 + if (pdidoi->dwOfs != DIDFT_GETINSTANCE (pdidoi->dwType)) + write_log ("%x-%s: %x <> %x\n", pdidoi->dwType & 0xff, pdidoi->tszName, + pdidoi->dwOfs, DIDFT_GETINSTANCE (pdidoi->dwType)); +#endif if (pdidoi->dwType & DIDFT_AXIS) { int sort = 0; if (did->axles >= MAX_MAPPINGS) return DIENUM_CONTINUE; - did->axismappings[did->axles] = pdidoi->dwOfs; + did->axismappings[did->axles] = DIDFT_GETINSTANCE (pdidoi->dwType); did->axisname[did->axles] = my_strdup (pdidoi->tszName); if (did->type == DID_JOYSTICK) sort = makesort_joy (&pdidoi->guidType, &did->axismappings[did->axles]); @@ -833,13 +838,16 @@ static BOOL CALLBACK EnumObjectsCallback (const DIDEVICEOBJECTINSTANCE* pdidoi, return DIENUM_CONTINUE; did->buttonname[did->buttons] = my_strdup (pdidoi->tszName); if (did->type == DID_JOYSTICK) { - did->buttonmappings[did->buttons] = DIJOFS_BUTTON(did->buttons); // pdidoi->dwOfs returns garbage!! + //did->buttonmappings[did->buttons] = DIJOFS_BUTTON(DIDFT_GETINSTANCE (pdidoi->dwType)); + did->buttonmappings[did->buttons] = DIJOFS_BUTTON(did->buttons); did->buttonsort[did->buttons] = makesort_joy (&pdidoi->guidType, &did->buttonmappings[did->buttons]); } else if (did->type == DID_MOUSE) { - did->buttonmappings[did->buttons] = FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + did->buttons; + //did->buttonmappings[did->buttons] = FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + DIDFT_GETINSTANCE (pdidoi->dwType); + did->buttonmappings[did->buttons] = FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + did->buttons; did->buttonsort[did->buttons] = makesort_mouse (&pdidoi->guidType, &did->buttonmappings[did->buttons]); } else { - did->buttonmappings[did->buttons] = pdidoi->dwOfs; + //did->buttonmappings[did->buttons] = pdidoi->dwOfs; + did->buttonmappings[did->buttons] = DIDFT_GETINSTANCE (pdidoi->dwType); } did->buttons++; } @@ -1072,7 +1080,7 @@ static int init_mouse (void) if (!did->disabled && did->connection == DIDC_DX) { hr = IDirectInput8_CreateDevice (g_lpdi, &did->guid, &lpdi, NULL); if (SUCCEEDED (hr)) { - hr = IDirectInputDevice8_SetDataFormat (lpdi, &c_dfDIMouse); + hr = IDirectInputDevice8_SetDataFormat (lpdi, &c_dfDIMouse2); IDirectInputDevice8_EnumObjects (lpdi, EnumObjectsCallback, (void*)did, DIDFT_ALL); fixbuttons (did); fixthings_mouse (did); @@ -1446,7 +1454,7 @@ static int init_kb (void) hr = IDirectInputDevice8_SetProperty (lpdi, DIPROP_BUFFERSIZE, &dipdw.diph); if (FAILED (hr)) write_log ("keyboard setpropertry failed, %s\n", DXError (hr)); - IDirectInputDevice8_EnumObjects (lpdi, EnumObjectsCallback, (void*)did, DIDFT_ALL); + IDirectInputDevice8_EnumObjects (lpdi, EnumObjectsCallback, did, DIDFT_ALL); sortobjects (did, did->axismappings, did->axissort, did->axisname, did->axistype, did->axles); sortobjects (did, did->buttonmappings, did->buttonsort, did->buttonname, 0, did->buttons); did->lpdi = lpdi; diff --git a/od-win32/direct3d.c b/od-win32/direct3d.c index 883eeac7..b73eb50f 100755 --- a/od-win32/direct3d.c +++ b/od-win32/direct3d.c @@ -545,6 +545,20 @@ int D3D_needreset (void) return 0; } +void D3D_clear (void) +{ + HRESULT hr; + hr = IDirect3DDevice9_TestCooperativeLevel (d3ddev); + if (FAILED (hr)) + return; + IDirect3DDevice9_Clear (d3ddev, 0L, NULL, D3DCLEAR_TARGET, 0x00000000, 1.0f, 0L ); + hr = IDirect3DDevice9_BeginScene (d3ddev); + if (FAILED (hr)) + return; + IDirect3DDevice9_EndScene (d3ddev); + IDirect3DDevice9_Present (d3ddev, 0, 0, 0 ,0); +} + int D3D_locktexture (void) { D3DLOCKED_RECT locked; diff --git a/od-win32/direct3d.h b/od-win32/direct3d.h index 92c849c1..a1fef540 100755 --- a/od-win32/direct3d.h +++ b/od-win32/direct3d.h @@ -11,3 +11,4 @@ extern void D3D_guimode (int guion); extern HDC D3D_getDC(HDC hdc); extern int D3D_isenabled (void); extern int D3D_needreset (void); +extern void D3D_clear (void); diff --git a/od-win32/dxwrap.c b/od-win32/dxwrap.c index 2a6cd2b4..1aa4b564 100755 --- a/od-win32/dxwrap.c +++ b/od-win32/dxwrap.c @@ -49,7 +49,7 @@ static void freemainsurface (void) releaser (dxdata.secondary, IDirectDrawSurface7_Release); releaser (dxdata.cursorsurface1, IDirectDrawSurface7_Release); releaser (dxdata.cursorsurface2, IDirectDrawSurface7_Release); - releaser (dxdata.statussurface, IDirectDrawSurface7_Release); +// releaser (dxdata.statussurface, IDirectDrawSurface7_Release); dxdata.backbuffers = 0; } @@ -265,16 +265,16 @@ static void createcursorsurface (void) { releaser (dxdata.cursorsurface1, IDirectDrawSurface7_Release); releaser (dxdata.cursorsurface2, IDirectDrawSurface7_Release); - releaser (dxdata.statussurface, IDirectDrawSurface7_Release); +// releaser (dxdata.statussurface, IDirectDrawSurface7_Release); dxdata.cursorsurface1 = allocsurface_2 (dxdata.cursorwidth, dxdata.cursorheight, TRUE); dxdata.cursorsurface2 = allocsurface_2 (dxdata.cursorwidth, dxdata.cursorheight, FALSE); - dxdata.statussurface = allocsurface_2 (dxdata.statuswidth, dxdata.statusheight, FALSE); +// dxdata.statussurface = allocsurface_2 (dxdata.statuswidth, dxdata.statusheight, FALSE); if (dxdata.cursorsurface1) clearsurf (dxdata.cursorsurface1); if (dxdata.cursorsurface2) clearsurf (dxdata.cursorsurface2); - if (dxdata.statussurface) - clearsurf (dxdata.statussurface); +// if (dxdata.statussurface) +// clearsurf (dxdata.statussurface); } HRESULT DirectDraw_CreateMainSurface (int width, int height) @@ -741,16 +741,16 @@ void DirectDraw_BlitRect (LPDIRECTDRAWSURFACE7 dst, RECT *dstrect, LPDIRECTDRAWS DirectDraw_Blt (dst, dstrect, src, scrrect); } -void DirectDraw_Fill (RECT *rect, uae_u32 color) +static void DirectDraw_FillSurface (LPDIRECTDRAWSURFACE7 dst, RECT *rect, uae_u32 color) { HRESULT ddrval; DDBLTFX ddbltfx; - LPDIRECTDRAWSURFACE7 dst; + if (!dst) + return; memset (&ddbltfx, 0, sizeof (ddbltfx)); ddbltfx.dwFillColor = color; ddbltfx.dwSize = sizeof (ddbltfx); - dst = getlocksurface (); while (FAILED (ddrval = IDirectDrawSurface7_Blt (dst, rect, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &ddbltfx))) { if (ddrval == DDERR_SURFACELOST) { ddrval = restoresurface (dst); @@ -764,30 +764,14 @@ void DirectDraw_Fill (RECT *rect, uae_u32 color) } -void DirectDraw_FillPrimary (void) +void DirectDraw_Fill (RECT *rect, uae_u32 color) { - HRESULT ddrval; - DDBLTFX ddbltfx; - LPDIRECTDRAWSURFACE7 dst; - DWORD color = 0; - RECT *rect = NULL; + DirectDraw_FillSurface (getlocksurface (), rect, color); +} - memset (&ddbltfx, 0, sizeof (ddbltfx)); - ddbltfx.dwFillColor = color; - ddbltfx.dwSize = sizeof (ddbltfx); - dst = dxdata.primary; - if (dst == NULL) - return; - while (FAILED (ddrval = IDirectDrawSurface7_Blt (dst, rect, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &ddbltfx))) { - if (ddrval == DDERR_SURFACELOST) { - ddrval = restoresurface (dst); - if (FAILED (ddrval)) - break; - } else if (ddrval != DDERR_SURFACEBUSY) { - write_log ("DirectDraw_FillPrimary: %s\n", DXError (ddrval)); - break; - } - } +void DirectDraw_FillPrimary (void) +{ + DirectDraw_FillSurface (dxdata.primary, NULL, 0); } extern int vblank_skip; @@ -897,6 +881,7 @@ void DirectDraw_Release (void) int DirectDraw_Start (GUID *guid) { + static int d3ddone; HRESULT ddrval; LPDIRECT3D9 d3d; D3DCAPS9 d3dCaps; @@ -935,24 +920,27 @@ int DirectDraw_Start (GUID *guid) } #endif - dxdata.statuswidth = 800; - dxdata.statusheight = TD_TOTAL_HEIGHT; +// dxdata.statuswidth = 800; +// dxdata.statusheight = TD_TOTAL_HEIGHT; dxdata.cursorwidth = 48; dxdata.cursorheight = 48; dxdata.maxwidth = 16384; dxdata.maxheight = 16384; - d3dDLL = LoadLibrary ("D3D9.DLL"); - if (d3dDLL) { - d3d = Direct3DCreate9 (D3D9b_SDK_VERSION); - if (d3d) { - if (SUCCEEDED (IDirect3D9_GetDeviceCaps (d3d, 0, D3DDEVTYPE_HAL, &d3dCaps))) { - dxdata.maxwidth = d3dCaps.MaxTextureWidth; - dxdata.maxheight = d3dCaps.MaxTextureHeight; - write_log ("Max hardware surface size: %dx%d\n", dxdata.maxwidth, dxdata.maxheight); + if (!d3ddone) { + d3dDLL = LoadLibrary ("D3D9.DLL"); + if (d3dDLL) { + d3d = Direct3DCreate9 (D3D9b_SDK_VERSION); + if (d3d) { + if (SUCCEEDED (IDirect3D9_GetDeviceCaps (d3d, 0, D3DDEVTYPE_HAL, &d3dCaps))) { + dxdata.maxwidth = d3dCaps.MaxTextureWidth; + dxdata.maxheight = d3dCaps.MaxTextureHeight; + write_log ("Max hardware surface size: %dx%d\n", dxdata.maxwidth, dxdata.maxheight); + } + IDirect3D9_Release (d3d); } - IDirect3D9_Release (d3d); + FreeLibrary (d3dDLL); } - FreeLibrary (d3dDLL); + d3ddone = 1; } if (dxdata.maxwidth < 2048) dxdata.maxwidth = 2048; diff --git a/od-win32/picasso96_win.c b/od-win32/picasso96_win.c index f776997b..83b62c1b 100755 --- a/od-win32/picasso96_win.c +++ b/od-win32/picasso96_win.c @@ -2442,6 +2442,7 @@ static uae_u32 REGPARAM2 picasso_SetPanning (TrapContext *ctx) uaecptr bmeptr = get_long (bi + PSSO_BoardInfo_BitMapExtra); /* Get our BoardInfo ptr's BitMapExtra ptr */ uae_u16 bme_width, bme_height; int changed = 0; + RGBFTYPE rgbf; if (oldscr == 0) { oldscr = start_of_screen; @@ -2465,6 +2466,7 @@ static uae_u32 REGPARAM2 picasso_SetPanning (TrapContext *ctx) bme_width = get_word (bmeptr + PSSO_BitMapExtra_Width); bme_height = get_word (bmeptr + PSSO_BitMapExtra_Height); + rgbf = picasso96_state.RGBFormat; picasso96_state.Address = start_of_screen; /* Amiga-side address */ picasso96_state.XOffset = (uae_s16)(m68k_dreg (regs, 1) & 0xFFFF); @@ -2478,6 +2480,9 @@ static uae_u32 REGPARAM2 picasso_SetPanning (TrapContext *ctx) picasso96_state.BytesPerRow = picasso96_state.VirtualWidth * picasso96_state.BytesPerPixel; picasso_SetPanningInit(); + if (rgbf != picasso96_state.RGBFormat) + gfx_set_picasso_colors (picasso96_state.RGBFormat); + full_refresh = 1; set_panning_called = 1; P96TRACE(("SetPanning(%d, %d, %d) Start 0x%x, BPR %d Bpp %d RGBF %d\n", diff --git a/od-win32/picasso96_win.h b/od-win32/picasso96_win.h index 5a864611..a34da8a8 100755 --- a/od-win32/picasso96_win.h +++ b/od-win32/picasso96_win.h @@ -569,6 +569,7 @@ struct picasso_vidbuf_description { extern struct picasso_vidbuf_description picasso_vidinfo; extern void gfx_set_picasso_modeinfo (uae_u32 w, uae_u32 h, uae_u32 d, RGBFTYPE rgbfmt); +extern void gfx_set_picasso_colors (RGBFTYPE rgbfmt); extern void gfx_set_picasso_baseaddr (uaecptr); extern void gfx_set_picasso_state (int on); extern uae_u8 *gfx_lock_picasso (void); diff --git a/od-win32/win32.c b/od-win32/win32.c index b790ce1d..0eb1c7c6 100755 --- a/od-win32/win32.c +++ b/od-win32/win32.c @@ -1780,6 +1780,20 @@ uae_u8 *save_log (int bootlog, int *len) return dst; } +static void strip_slashes (char *p) +{ + while (strlen (p) > 0 && (p[strlen (p) - 1] == '\\' || p[strlen (p) - 1] == '/')) + p[strlen (p) - 1] = 0; +} +static void fixtrailing(char *p) +{ + if (strlen(p) == 0) + return; + if (p[strlen(p) - 1] == '/' || p[strlen(p) - 1] == '\\') + return; + strcat(p, "\\"); +} + typedef DWORD (STDAPICALLTYPE *PFN_GetKey)(LPVOID lpvBuffer, DWORD dwSize); uae_u8 *target_load_keyfile (struct uae_prefs *p, char *path, int *sizep, char *name) { @@ -1794,8 +1808,18 @@ uae_u8 *target_load_keyfile (struct uae_prefs *p, char *path, int *sizep, char * char path[MAX_DPATH]; sprintf (path, "%s..\\Player\\%s", start_path_exe, libname); h = LoadLibrary (path); - if (!h) - return NULL; + if (!h) { + char *afr = getenv ("AMIGAFOREVERROOT"); + if (afr) { + char tmp[MAX_DPATH]; + strcpy (tmp, afr); + fixtrailing (tmp); + sprintf (path, "%sPlayer\\%s", tmp, libname); + h = LoadLibrary (path); + if (!h) + return NULL; + } + } } GetModuleFileName (h, name, MAX_DPATH); pfnGetKey = (PFN_GetKey)GetProcAddress (h, "GetKey"); @@ -2074,20 +2098,6 @@ void fetch_datapath (char *out, int size) fetch_path (NULL, out, size); } -static void strip_slashes (char *p) -{ - while (strlen (p) > 0 && (p[strlen (p) - 1] == '\\' || p[strlen (p) - 1] == '/')) - p[strlen (p) - 1] = 0; -} -static void fixtrailing(char *p) -{ - if (strlen(p) == 0) - return; - if (p[strlen(p) - 1] == '/' || p[strlen(p) - 1] == '\\') - return; - strcat(p, "\\"); -} - static int isfilesindir(char *p) { WIN32_FIND_DATA fd; @@ -3396,9 +3406,9 @@ LONG WINAPI WIN32_ExceptionFilter (struct _EXCEPTION_POINTERS *pExceptionPointer if (dump) { HANDLE f = CreateFile (path2, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (f != INVALID_HANDLE_VALUE) { + flush_log (); savedump (dump, f, pExceptionPointers); CloseHandle (f); - flush_log (); if (isfullscreen () <= 0) { sprintf (msg, "Crash detected. MiniDump saved as:\n%s\n", path2); MessageBox (NULL, msg, "Crash", MB_OK | MB_ICONWARNING | MB_TASKMODAL | MB_SETFOREGROUND); diff --git a/od-win32/win32.h b/od-win32/win32.h index dbf69544..ecbb38ed 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -16,8 +16,8 @@ #define GETBDD(x) ((x) % 100) #define WINUAEBETA 1 -#define WINUAEPUBLICBETA 2 -#define WINUAEDATE MAKEBD(2008, 6, 24) +#define WINUAEPUBLICBETA 3 +#define WINUAEDATE MAKEBD(2008, 6, 28) #define WINUAEEXTRA "" #define WINUAEREV "" diff --git a/od-win32/win32gfx.c b/od-win32/win32gfx.c index 0d97cc7d..4d0b03fe 100755 --- a/od-win32/win32gfx.c +++ b/od-win32/win32gfx.c @@ -130,12 +130,16 @@ int isscreen (void) return hMainWnd ? 1 : 0; } -int isfullscreen (void) +static int isfullscreen_2 (struct uae_prefs *p) { if (screen_is_picasso) - return currprefs.gfx_pfullscreen == 1 ? 1 : (currprefs.gfx_pfullscreen == 2 ? -1 : 0); + return p->gfx_pfullscreen == 1 ? 1 : (p->gfx_pfullscreen == 2 ? -1 : 0); else - return currprefs.gfx_afullscreen == 1 ? 1 : (currprefs.gfx_afullscreen == 2 ? -1 : 0); + return p->gfx_afullscreen == 1 ? 1 : (p->gfx_afullscreen == 2 ? -1 : 0); +} +int isfullscreen (void) +{ + return isfullscreen_2 (&currprefs); } int is3dmode (void) @@ -704,8 +708,19 @@ static void DX_Blit96 (int x, int y, int w, int h) RECT dr, sr; if (scalepicasso) { + int srcratio, dstratio; SetRect (&sr, 0, 0, picasso96_state.Width, picasso96_state.Height); - SetRect (&dr, 0, 0, currentmode->native_width, currentmode->native_height); + srcratio = picasso96_state.Width * 256 / picasso96_state.Height; + dstratio = currentmode->native_width * 256 / currentmode->native_height; + if (srcratio == dstratio) { + SetRect (&dr, 0, 0, currentmode->native_width, currentmode->native_height); + } else if (srcratio > dstratio) { + int yy = currentmode->native_height - currentmode->native_height * dstratio / srcratio; + SetRect (&dr, 0, yy / 2, currentmode->native_width, currentmode->native_height - yy / 2); + } else { + int xx = currentmode->native_width - currentmode->native_width * srcratio / dstratio; + SetRect (&dr, xx / 2, 0, currentmode->native_width - xx / 2, currentmode->native_height); + } DirectDraw_BlitToPrimaryScale (&dr, &sr); } else { SetRect (&sr, x, y, x + w, y + h); @@ -739,9 +754,9 @@ void gfx_unlock_picasso (void) if (p96_double_buffer_needs_flushing) { if (scalepicasso) { p96_double_buffer_firstx = 0; - p96_double_buffer_lastx = picasso_vidinfo.width; + p96_double_buffer_lastx = picasso96_state.Width; p96_double_buffer_first = 0; - p96_double_buffer_last = picasso_vidinfo.height; + p96_double_buffer_last = picasso96_state.Height; } picasso_putcursor (p96_double_buffer_firstx, p96_double_buffer_first, p96_double_buffer_lastx - p96_double_buffer_firstx + 1, p96_double_buffer_last - p96_double_buffer_first + 1); @@ -878,18 +893,18 @@ static void update_gfxparams (void) if ((currprefs.win32_rtgscaleifsmall || currprefs.win32_rtgallowscaling) && (picasso96_state.Width != currentmode->native_width || picasso96_state.Height != currentmode->native_height)) scalepicasso = -1; } else if (isfullscreen () > 0) { - if (currprefs.gfx_size.width > picasso96_state.Width && currprefs.gfx_size.width > picasso96_state.Height) { - if (currprefs.win32_rtgscaleifsmall) + if (currprefs.gfx_size.width > picasso96_state.Width && currprefs.gfx_size.height > picasso96_state.Height) { + if (currprefs.win32_rtgscaleifsmall && !currprefs.win32_rtgmatchdepth) scalepicasso = 1; } } else if (isfullscreen () == 0) { - if (currprefs.gfx_size.width != picasso96_state.Width && currprefs.gfx_size.width != picasso96_state.Height && currprefs.win32_rtgallowscaling) + if ((currprefs.gfx_size.width != picasso96_state.Width || currprefs.gfx_size.height != picasso96_state.Height) && currprefs.win32_rtgallowscaling) scalepicasso = 1; - if ((currprefs.gfx_size.width > picasso96_state.Width || currprefs.gfx_size.width > picasso96_state.Height) && currprefs.win32_rtgscaleifsmall) + if ((currprefs.gfx_size.width > picasso96_state.Width || currprefs.gfx_size.height > picasso96_state.Height) && currprefs.win32_rtgscaleifsmall) scalepicasso = 1; } - if (scalepicasso > 0 && currprefs.gfx_size.width != picasso96_state.Width && currprefs.gfx_size.width != picasso96_state.Height) { + if (scalepicasso > 0 && (currprefs.gfx_size.width != picasso96_state.Width || currprefs.gfx_size.height != picasso96_state.Height)) { currentmode->current_width = currprefs.gfx_size.width; currentmode->current_height = currprefs.gfx_size.height; } @@ -984,9 +999,9 @@ int check_prefs_changed_gfx (void) if (display_change_requested || c) { - int staywindowed = - currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen && currprefs.gfx_afullscreen != 1 && - currprefs.gfx_pfullscreen == changed_prefs.gfx_pfullscreen && currprefs.gfx_pfullscreen != 1; + int keepfsmode = + currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen && + currprefs.gfx_pfullscreen == changed_prefs.gfx_pfullscreen; cfgfile_configuration_change (1); if (display_change_requested) c |= 2; @@ -995,6 +1010,17 @@ int check_prefs_changed_gfx (void) currprefs.gfx_autoresolution = changed_prefs.gfx_autoresolution; currprefs.color_mode = changed_prefs.color_mode; + if (changed_prefs.gfx_afullscreen == 1) { + if (currprefs.gfx_filter == UAE_FILTER_DIRECT3D && changed_prefs.gfx_filter != UAE_FILTER_DIRECT3D) + keepfsmode = 0; + if (currprefs.gfx_filter == UAE_FILTER_OPENGL && changed_prefs.gfx_filter != UAE_FILTER_OPENGL) + keepfsmode = 0; + if (changed_prefs.gfx_filter == UAE_FILTER_DIRECT3D && currprefs.gfx_filter != UAE_FILTER_DIRECT3D) + keepfsmode = 0; + if (changed_prefs.gfx_filter == UAE_FILTER_OPENGL && currprefs.gfx_filter != UAE_FILTER_OPENGL) + keepfsmode = 0; + } + currprefs.gfx_filter = changed_prefs.gfx_filter; currprefs.gfx_filter_filtermode = changed_prefs.gfx_filter_filtermode; currprefs.gfx_filter_horiz_zoom_mult = changed_prefs.gfx_filter_horiz_zoom_mult; @@ -1023,12 +1049,12 @@ int check_prefs_changed_gfx (void) currprefs.win32_rtgallowscaling = changed_prefs.win32_rtgallowscaling; inputdevice_unacquire (); - if ((c & 16) || ((c & 8) && staywindowed)) { + if ((c & 16) || ((c & 8) && keepfsmode)) { extern int reopen (int); if (reopen (c & 2)) c |= 2; } - if ((c & 2) && !staywindowed) { + if ((c & 2) && !keepfsmode) { close_windows (); graphics_init (); } @@ -1355,15 +1381,15 @@ static int reopen (int full) full = 1; if (changed_prefs.gfx_pfullscreen != currprefs.gfx_pfullscreen && screen_is_picasso) full = 1; + /* fullscreen to fullscreen? */ - if (!screen_is_picasso && changed_prefs.gfx_afullscreen && currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen) { - if (currprefs.gfx_size_fs.width != changed_prefs.gfx_size_fs.width || - currprefs.gfx_size_fs.height != changed_prefs.gfx_size_fs.height) { - quick = 1; - } + if (isfullscreen () > 0 && currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen && + currprefs.gfx_pfullscreen == changed_prefs.gfx_pfullscreen && currprefs.gfx_afullscreen == 1) { + quick = 1; } /* windowed to windowed */ - if (isfullscreen () <= 0 && currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen && currprefs.gfx_pfullscreen == changed_prefs.gfx_pfullscreen) { + if (isfullscreen () <= 0 && currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen && + currprefs.gfx_pfullscreen == changed_prefs.gfx_pfullscreen) { quick = 1; } @@ -1379,12 +1405,14 @@ static int reopen (int full) currprefs.gfx_pvsync = changed_prefs.gfx_pvsync; currprefs.gfx_refreshrate = changed_prefs.gfx_refreshrate; + + if (!quick) return 1; open_windows (0); - if (isfullscreen () < 0) + if (isfullscreen () <= 0) DirectDraw_FillPrimary (); return 0; @@ -1400,10 +1428,8 @@ static int modeswitchneeded (struct winuae_currentmode *wc) if (picasso96_state.BytesPerPixel * 8 != wc->current_depth && currprefs.win32_rtgmatchdepth) return -1; if (picasso96_state.Width < wc->current_width && picasso96_state.Height < wc->current_height) { - if (currprefs.win32_rtgscaleifsmall) { - // scalepicasso = 1 + if (currprefs.win32_rtgscaleifsmall && !currprefs.win32_rtgmatchdepth) return 0; - } } if (picasso96_state.Width != wc->current_width || picasso96_state.Height != wc->current_height) @@ -1438,6 +1464,11 @@ static int modeswitchneeded (struct winuae_currentmode *wc) return 0; } +static void clearscreen (void) +{ + DirectDraw_FillPrimary (); +} + void gfx_set_picasso_state (int on) { struct winuae_currentmode wc; @@ -1450,7 +1481,8 @@ void gfx_set_picasso_state (int on) memcpy (&wc, currentmode, sizeof (wc)); updatemodes (); - DirectDraw_FillPrimary (); + update_gfxparams (); + clearscreen (); if (currprefs.gfx_afullscreen != currprefs.gfx_pfullscreen || (currprefs.gfx_afullscreen == 1 && (currprefs.gfx_filter == UAE_FILTER_DIRECT3D || currprefs.gfx_filter == UAE_FILTER_OPENGL))) { mode = 1; @@ -1459,14 +1491,12 @@ void gfx_set_picasso_state (int on) if (!mode) goto end; } - update_gfxparams (); if (mode < 0) { open_windows (0); } else { open_screen (); // reopen everything } end: - update_gfxparams (); #ifdef RETROPLATFORM rp_set_hwnd (hAmigaWnd); #endif @@ -1475,9 +1505,9 @@ end: void gfx_set_picasso_modeinfo (uae_u32 w, uae_u32 h, uae_u32 depth, RGBFTYPE rgbfmt) { int need; - alloc_colors_picasso (x_red_bits, x_green_bits, x_blue_bits, x_red_shift, x_green_shift, x_blue_shift, rgbfmt); if (!screen_is_picasso) return; + gfx_set_picasso_colors (rgbfmt); updatemodes (); need = modeswitchneeded (currentmode); update_gfxparams (); @@ -1492,6 +1522,11 @@ void gfx_set_picasso_modeinfo (uae_u32 w, uae_u32 h, uae_u32 depth, RGBFTYPE rgb } #endif +void gfx_set_picasso_colors (RGBFTYPE rgbfmt) +{ + alloc_colors_picasso (x_red_bits, x_green_bits, x_blue_bits, x_red_shift, x_green_shift, x_blue_shift, rgbfmt); +} + static void gfxmode_reset (void) { #ifdef GFXFILTER @@ -1718,12 +1753,14 @@ static int create_windows_2 (void) if (hAmigaWnd) { RECT r; int w, h, x, y; - int nw, nh; + int nw, nh, nx, ny; GetWindowRect (hAmigaWnd, &r); x = r.left; y = r.top; - w = r.bottom - r.top; - h = r.right - r.left; + w = r.right - r.left; + h = r.bottom - r.top; + nx = x; + ny = y; if (screen_is_picasso) { nw = currentmode->current_width; nh = currentmode->current_height; @@ -1731,11 +1768,20 @@ static int create_windows_2 (void) nw = currprefs.gfx_size_win.width; nh = currprefs.gfx_size_win.height; } - if (isfullscreen () == 0 && (w != nw || h != nh)) { + if (fsw || dxfs) { + RECT rc = getdisplay (&currprefs)->rect; + nx = rc.left; + ny = rc.top; + nw = rc.right - rc.left; + nh = rc.bottom - rc.top; + } + if (w != nw || h != nh || x != nx || y != ny) { w = nw; h = nh; + x = nx; + y = ny; in_sizemove++; - if (hMainWnd) { + if (hMainWnd && !fsw && !dxfs) { GetWindowRect (hMainWnd, &r); x = r.left; y = r.top; @@ -2206,7 +2252,7 @@ void updatewinfsmode (struct uae_prefs *p) struct MultiDisplay *md; fixup_prefs_dimensions (p); - if (p->gfx_afullscreen) { + if (isfullscreen_2 (p) != 0) { p->gfx_size = p->gfx_size_fs; } else { p->gfx_size = p->gfx_size_win; diff --git a/od-win32/win32gui.c b/od-win32/win32gui.c index 84dc970b..3dd8c59c 100755 --- a/od-win32/win32gui.c +++ b/od-win32/win32gui.c @@ -127,7 +127,7 @@ static char stored_path[MAX_DPATH]; void WIN32GUI_LoadUIString(DWORD id, char *string, DWORD dwStringLen) { - if(LoadString(hUIDLL ? hUIDLL : hInst, id, string, dwStringLen) == 0) + if (LoadString(hUIDLL ? hUIDLL : hInst, id, string, dwStringLen) == 0) LoadString(hInst, id, string, dwStringLen); } @@ -150,12 +150,12 @@ static struct ToolTipHWNDS ToolTipHWNDS2[MAX_IMAGETOOLTIPS + 1]; static void ew (HWND hDlg, DWORD id, int enable) { - HWND w = GetDlgItem(hDlg, id); + HWND w = GetDlgItem (hDlg, id); if (!w) return; - if (!enable && w == GetFocus()) - SendMessage(hDlg, WM_NEXTDLGCTL, 0, FALSE); - EnableWindow(w, !!enable); + if (!enable && w == GetFocus ()) + SendMessage (hDlg, WM_NEXTDLGCTL, 0, FALSE); + EnableWindow (w, !!enable); } void write_disk_history (void) @@ -169,7 +169,7 @@ void write_disk_history (void) return; j = 1; for (i = 0; i <= MAX_PREVIOUS_FLOPPIES; i++) { - char *s = DISK_history_get(i); + char *s = DISK_history_get (i); if (s == 0 || strlen(s) == 0) continue; sprintf (tmp, "Image%02d", j); @@ -191,7 +191,7 @@ void reset_disk_history (void) for (i = 0; i < MAX_PREVIOUS_FLOPPIES; i++) DISK_history_add (NULL, i); - write_disk_history(); + write_disk_history (); } UAEREG *read_disk_history (void) @@ -1568,7 +1568,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs break; case IDC_DF3: SetDlgItemText (hDlg, IDC_DF3TEXT, full_path); - strcpy(prefs->df[3], full_path); + strcpy (prefs->df[3], full_path); DISK_history_add (full_path, -1); break; case IDC_DOSAVESTATE: @@ -1580,15 +1580,15 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs { char disk_name[32]; disk_name[0] = 0; disk_name[31] = 0; - GetDlgItemText(hDlg, IDC_CREATE_NAME, disk_name, 30); - disk_creatediskfile(full_path, 0, SendDlgItemMessage(hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L), disk_name); + GetDlgItemText (hDlg, IDC_CREATE_NAME, disk_name, 30); + disk_creatediskfile (full_path, 0, SendDlgItemMessage (hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L), disk_name); } break; case IDC_CREATE_RAW: - disk_creatediskfile(full_path, 1, SendDlgItemMessage(hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L), NULL); + disk_creatediskfile (full_path, 1, SendDlgItemMessage(hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L), NULL); break; case IDC_LOAD: - if (target_cfgfile_load(&workprefs, full_path, 0, 0) == 0) { + if (target_cfgfile_load (&workprefs, full_path, 0, 0) == 0) { char szMessage[MAX_DPATH]; WIN32GUI_LoadUIString (IDS_COULDNOTLOADCONFIG, szMessage, MAX_DPATH); pre_gui_message (szMessage); @@ -1615,10 +1615,10 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs strcpy (workprefs.cartfile, full_path); break; case IDC_INPREC_PLAY: - inprec_open(full_path, IsDlgButtonChecked (hDlg, IDC_INPREC_PLAYMODE) == BST_CHECKED ? -1 : -2); + inprec_open (full_path, IsDlgButtonChecked (hDlg, IDC_INPREC_PLAYMODE) == BST_CHECKED ? -1 : -2); break; case IDC_INPREC_RECORD: - inprec_open(full_path, 1); + inprec_open (full_path, 1); break; } if (!nosavepath) { @@ -1643,11 +1643,11 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs } return result; } -int DiskSelection(HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, char *path_out) +int DiskSelection (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, char *path_out) { return DiskSelection_2 (hDlg, wParam, flag, prefs, path_out, NULL); } -int MultiDiskSelection(HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, char *path_out) +int MultiDiskSelection (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, char *path_out) { int multi = 0; return DiskSelection_2 (hDlg, wParam, flag, prefs, path_out, &multi); @@ -1847,7 +1847,7 @@ static void setguititle (HWND phwnd) static void GetConfigPath (char *path, struct ConfigStruct *parent, int noroot) { - if (parent == 0) { + if (parent == NULL) { path[0] = 0; if (!noroot) { fetch_path ("ConfigurationPath", path, MAX_DPATH); @@ -1863,7 +1863,7 @@ static void GetConfigPath (char *path, struct ConfigStruct *parent, int noroot) void FreeConfigStruct (struct ConfigStruct *config) { - free (config); + xfree (config); } struct ConfigStruct *AllocConfigStruct (void) { @@ -1878,7 +1878,7 @@ static void FreeConfigStore (void) int i; for (i = 0; i < configstoresize; i++) FreeConfigStruct (configstore[i]); - free (configstore); + xfree (configstore); configstore = 0; configstoresize = configstoreallocated = 0; } @@ -1947,6 +1947,9 @@ static struct ConfigStruct *readconfigcache (const char *path) HANDLE h; WIN32_FIND_DATA ffd; +#if CONFIGCACHE == 0 + return NULL; +#endif err = 0; first = NULL; getconfigcache (cachepath, path); @@ -2222,6 +2225,7 @@ static struct ConfigStruct *GetConfigs (struct ConfigStruct *configparent, int u if (*level == 0) FreeConfigStore (); + first = NULL; GetConfigPath (path, configparent, FALSE); GetConfigPath (shortpath, configparent, TRUE); @@ -2315,14 +2319,14 @@ static struct ConfigStruct *GetConfigs (struct ConfigStruct *configparent, int u break; } } - if (*level == 0) + if (*level == 0 && CONFIGCACHE) writeconfigcache (path); return first; } static struct ConfigStruct *CreateConfigStore (struct ConfigStruct *oldconfig, int flushcache) { - int level = 0, i; + int level, i; char path[MAX_DPATH], name[MAX_DPATH]; struct ConfigStruct *cs; @@ -2330,6 +2334,7 @@ static struct ConfigStruct *CreateConfigStore (struct ConfigStruct *oldconfig, i strcpy (path, oldconfig->Path); strcpy (name, oldconfig->Name); } + level = 0; GetConfigs (NULL, 1, &level, flushcache); if (oldconfig) { for (i = 0; i < configstoresize; i++) { @@ -2348,6 +2353,8 @@ static char *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *conf static char full_path[MAX_DPATH]; full_path[0] = 0; + name[0] = 0; + desc[0] = 0; GetDlgItemText (hDlg, IDC_EDITNAME, name, MAX_DPATH); strcpy (config_filename, name); if (flag == CONFIG_SAVE_FULL || flag == CONFIG_SAVE) { @@ -2391,7 +2398,7 @@ static char *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *conf case CONFIG_LOAD: if (strlen (name) == 0) { char szMessage[MAX_DPATH]; - WIN32GUI_LoadUIString(IDS_MUSTSELECTCONFIG, szMessage, MAX_DPATH); + WIN32GUI_LoadUIString (IDS_MUSTSELECTCONFIG, szMessage, MAX_DPATH); pre_gui_message (szMessage); } else { if (target_cfgfile_load (&workprefs, path, configtypepanel, 0) == 0) { @@ -3026,13 +3033,21 @@ static void InitializeConfig (HWND hDlg, struct ConfigStruct *config) SendDlgItemMessage (hDlg, IDC_CONFIGLINK, CB_SETCURSEL, idx2, 0); } +static void DeleteConfigTree (HWND hDlg) +{ + int i; + HWND TVhDlg = GetDlgItem(hDlg, IDC_CONFIGTREE); + for (i = 0; i < configstoresize; i++) + configstore[i]->item = NULL; + TreeView_DeleteAllItems (TVhDlg); +} + static HTREEITEM InitializeConfigTreeView (HWND hDlg) { HIMAGELIST himl = ImageList_Create (16, 16, ILC_COLOR8 | ILC_MASK, 3, 0); HWND TVhDlg = GetDlgItem(hDlg, IDC_CONFIGTREE); HTREEITEM parent; char path[MAX_DPATH]; - int i; if (himl) { HICON icon; @@ -3044,9 +3059,7 @@ static HTREEITEM InitializeConfigTreeView (HWND hDlg) ImageList_AddIcon (himl, icon); TreeView_SetImageList (TVhDlg, himl, TVSIL_NORMAL); } - for (i = 0; i < configstoresize; i++) - configstore[i]->item = NULL; - TreeView_DeleteAllItems (TVhDlg); + DeleteConfigTree (hDlg); GetConfigPath (path, NULL, FALSE); parent = AddConfigNode (hDlg, NULL, path, NULL, NULL, 0, 1, NULL); LoadConfigTreeView (hDlg, -1, parent); @@ -3133,12 +3146,14 @@ static struct ConfigStruct *initloadsave (HWND hDlg, struct ConfigStruct *config return config; } -static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct *config, char **pcfgfile, char *newpath) +static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct **configp, char **pcfgfile, char *newpath) { + struct ConfigStruct *config = *configp; switch (LOWORD (wParam)) { case IDC_SAVE: HandleConfiguration (hDlg, CONFIG_SAVE_FULL, config, newpath); + DeleteConfigTree (hDlg); config = CreateConfigStore (config, TRUE); config = fixloadconfig (hDlg, config); ConfigToRegistry (config, configtypepanel); @@ -3147,6 +3162,7 @@ static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct *con break; case IDC_QUICKSAVE: HandleConfiguration (hDlg, CONFIG_SAVE, config, NULL); + DeleteConfigTree (hDlg); config = CreateConfigStore (config, TRUE); config = fixloadconfig (hDlg, config); ConfigToRegistry (config, configtypepanel); @@ -3177,6 +3193,7 @@ static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct *con break; case IDC_DELETE: HandleConfiguration (hDlg, CONFIG_DELETE, config, NULL); + DeleteConfigTree (hDlg); config = CreateConfigStore (config, TRUE); config = fixloadconfig (hDlg, config); InitializeConfigTreeView (hDlg); @@ -3221,6 +3238,7 @@ static void loadsavecommands (HWND hDlg, WPARAM wParam, struct ConfigStruct *con } break; } + *configp = config; } static INT_PTR CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -3234,6 +3252,7 @@ static INT_PTR CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA case WM_INITDIALOG: recursive++; if (!configstore) { + DeleteConfigTree (hDlg); CreateConfigStore (NULL, FALSE); config = NULL; } @@ -3252,7 +3271,7 @@ static INT_PTR CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA if (id == IDC_SAVE || id == IDC_LOAD) { char *s = favoritepopup (hDlg); if (s) { - loadsavecommands (hDlg, id, config, &cfgfile, s); + loadsavecommands (hDlg, id, &config, &cfgfile, s); xfree (s); } } @@ -3262,7 +3281,7 @@ static INT_PTR CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA case WM_COMMAND: { recursive++; - loadsavecommands (hDlg, wParam, config, &cfgfile, NULL); + loadsavecommands (hDlg, wParam, &config, &cfgfile, NULL); recursive++; break; } @@ -3405,7 +3424,7 @@ static void SetupRichText(HWND hDlg, urlinfo *url) CharFormat.yHeight = 10 * 20; /* height in twips, where a twip is 1/20th of a point - for a pt.size of 18 */ CharFormat.crTextColor = GetSysColor(COLOR_ACTIVECAPTION); - strcpy(CharFormat.szFaceName, "Tahoma" ); + strcpy (CharFormat.szFaceName, os_vista ? "Segoe UI" : "Tahoma"); SendDlgItemMessage(hDlg, url->id, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&CharFormat); SendDlgItemMessage(hDlg, url->id, EM_SETBKGNDCOLOR, 0, GetSysColor(COLOR_3DFACE)); } @@ -3476,7 +3495,7 @@ static void setac (HWND hDlg, int id) } static void setautocomplete (HWND hDlg, int id) { - HWND item = FindWindowEx(GetDlgItem (hDlg, id), NULL, "Edit", NULL); + HWND item = FindWindowEx (GetDlgItem (hDlg, id), NULL, "Edit", NULL); if (item) SHAutoComplete (item, SHACF_FILESYSTEM | SHACF_AUTOAPPEND_FORCE_ON | SHACF_AUTOSUGGEST_FORCE_ON | SHACF_USETAB); } @@ -3554,14 +3573,14 @@ static INT_PTR CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM numtypes = 0; SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_RESETCONTENT, 0, 0L); if (af_path_2005 & 1) { - WIN32GUI_LoadUIString(IDS_DEFAULT_AF2005, tmp, sizeof tmp); + WIN32GUI_LoadUIString (IDS_DEFAULT_AF2005, tmp, sizeof tmp); SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_ADDSTRING, 0, (LPARAM)tmp); if (path_type == PATH_TYPE_NEWAF) selpath = numtypes; ptypes[numtypes++] = PATH_TYPE_NEWAF; } if (start_path_new1[0]) { - WIN32GUI_LoadUIString(IDS_DEFAULT_NEWWINUAE, tmp, sizeof tmp); + WIN32GUI_LoadUIString (IDS_DEFAULT_NEWWINUAE, tmp, sizeof tmp); SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_ADDSTRING, 0, (LPARAM)tmp); if (path_type == PATH_TYPE_NEWWINUAE) selpath = numtypes; @@ -3574,19 +3593,19 @@ static INT_PTR CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM ptypes[numtypes++] = PATH_TYPE_AMIGAFOREVERDATA; } if (af_path_old) { - WIN32GUI_LoadUIString(IDS_DEFAULT_AF, tmp, sizeof tmp); + WIN32GUI_LoadUIString (IDS_DEFAULT_AF, tmp, sizeof tmp); SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_ADDSTRING, 0, (LPARAM)tmp); if (path_type == PATH_TYPE_OLDAF) selpath = numtypes; ptypes[numtypes++] = PATH_TYPE_OLDAF; } - WIN32GUI_LoadUIString(IDS_DEFAULT_WINUAE, tmp, sizeof tmp); + WIN32GUI_LoadUIString (IDS_DEFAULT_WINUAE, tmp, sizeof tmp); SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_ADDSTRING, 0, (LPARAM)tmp); if (path_type == 0) selpath = numtypes; ptypes[numtypes++] = 0; SendDlgItemMessage (hDlg, IDC_PATHS_DEFAULTTYPE, CB_SETCURSEL, selpath, 0); - EnableWindow(GetDlgItem (hDlg, IDC_PATHS_DEFAULTTYPE), numtypes > 0 ? TRUE : FALSE); + EnableWindow (GetDlgItem (hDlg, IDC_PATHS_DEFAULTTYPE), numtypes > 0 ? TRUE : FALSE); values_to_pathsdialog (hDlg); recursive--; return TRUE; @@ -3600,7 +3619,7 @@ static INT_PTR CALLBACK PathsDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM case IDC_PATHS_ROMS: fetch_path ("KickstartPath", tmp, sizeof (tmp)); if (DirectorySelection (hDlg, 0, tmp)) { - load_keyring(&workprefs, NULL); + load_keyring (&workprefs, NULL); set_path ("KickstartPath", tmp); if (!scan_roms (1)) gui_message_id (IDS_ROMSCANNOROMS); diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 10f7245c..5d054619 100755 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,27 @@ +Beta 3: + +- corrected directinput keyboard enumeration, possible fix for + wrong keycodes (=non-working key) on some keyboard/driver + combinations. (bug since the beginning, I blame really bad keyboard + directinput documentation) +- Picasso96 color space conversion color errors (b2) +- Picasso96 now always keeps aspect ratio in scaled modes + (both windowed and full-window) +- window resize worked strangely in some cases +- full-window on the fly monitor change fixed +- disappearing mouse cursor if scaled window was smaller than original + Picasso96 resolution +- detect Amiga Forever 2008 Value Edition rom key when winuae is + located outside of AF install directory +- fullscreen to fullscreen non resolution/depth changes won't + reopen the display anymore (except D3D/OGL<>other filter change) +- fullscreen to fullscreen resolution/depth change speed improved +- Windowed Picasso96 scaling fixed when native mode was set to + fullscreen or fullwindow +- nasty memory corruption fixed in configuration handling introduced + in 1.5 betas. Causes random crash or memory corruption sooner or + later when saving configuration few times. Beta 2: @@ -12,6 +35,7 @@ Beta 2: - "Kickstart replacement" is compatible with new KS loader - interlace should work again in "normal" mode (no doubling or scanlines) (broken since 1.3b2..) +- interlace<>nonlace switching graphics problem fixed (1.5.0) - window is now reopened only when switching to fullscreen. Every on the fly windowed configuration change should never reopen the window anymore. @@ -26,7 +50,7 @@ Beta 2: - fixed possible crashes when switching Windows desktop resolution or when using quick user switching (post message if there are still problems, I rarely use these features) -- some directdraw and direct3d handle leaks fixed +- some directdraw and direct3d memory leaks fixed Beta 1: (1.5.1 in few weeks) -- 2.47.3