From 3209ed21764b5455f444303fa13f3d6e827a45b4 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 16 Dec 2015 19:50:05 +0200 Subject: [PATCH] 3220b3 --- od-win32/direct3d.cpp | 24 ++++------------------ od-win32/win32.cpp | 16 +++++++++++++++ od-win32/win32.h | 5 +++-- od-win32/win32gfx.cpp | 6 ++++-- od-win32/winuae_msvc14/winuae_msvc.vcxproj | 2 +- od-win32/winuaechangelog.txt | 7 +++++++ 6 files changed, 35 insertions(+), 25 deletions(-) diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index ad8ac418..1571df9a 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -46,9 +46,6 @@ static int psEnabled, psActive, shaderon; static struct gfx_filterdata *filterd3d; static int filterd3didx; -typedef HRESULT(CALLBACK* DWMISCOMPOSITIONENABLED)(BOOL*); -static HMODULE dwmapihandle; - static bool showoverlay = true; #define MAX_PASSES 2 @@ -2340,23 +2337,10 @@ static const TCHAR *D3D_init2 (HWND ahwnd, int w_w, int w_h, int depth, int *fre memcpy(&ap, apm, sizeof ap); - if (os_vista && isfullscreen() <= 0 && apm->gfx_backbuffers > 1 && !apm->gfx_vsync) { - BOOL dwm = FALSE; - DWMISCOMPOSITIONENABLED pDwmIsCompositionEnabled; - if (!dwmapihandle) - dwmapihandle = LoadLibrary(_T("dwmapi.dll")); - if (dwmapihandle) { - pDwmIsCompositionEnabled = (DWMISCOMPOSITIONENABLED)GetProcAddress(dwmapihandle, "DwmIsCompositionEnabled"); - if (pDwmIsCompositionEnabled) { - pDwmIsCompositionEnabled(&dwm); - } - } - if (dwm) { - struct apmode *ap2 = picasso_on ? &changed_prefs.gfx_apmode[APMODE_RTG] : &changed_prefs.gfx_apmode[APMODE_NATIVE]; - write_log(_T("Switch from triple buffer to double buffer.\n")); - ap.gfx_vflip = 0; - ap.gfx_backbuffers = 1; - } + if (os_dwm_enabled && isfullscreen() <= 0 && apm->gfx_backbuffers > 1 && !apm->gfx_vsync) { + write_log(_T("Switch from triple buffer to double buffer (%d).\n"), apm->gfx_vflip); + ap.gfx_vflip = 0; + ap.gfx_backbuffers = 1; } adapter = getd3dadapter (d3d); diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index ae48770d..b6a6503c 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -4794,6 +4794,7 @@ static int dxdetect (void) } int os_admin, os_64bit, os_win7, os_vista, cpu_number, os_touch; +BOOL os_dwm_enabled; static int isadminpriv (void) { @@ -4896,6 +4897,21 @@ static int osdetect (void) } } + if (os_vista) { + typedef HRESULT(CALLBACK* DWMISCOMPOSITIONENABLED)(BOOL*); + HMODULE dwmapihandle; + DWMISCOMPOSITIONENABLED pDwmIsCompositionEnabled; + dwmapihandle = LoadLibrary(_T("dwmapi.dll")); + if (dwmapihandle) { + pDwmIsCompositionEnabled = (DWMISCOMPOSITIONENABLED)GetProcAddress(dwmapihandle, "DwmIsCompositionEnabled"); + if (pDwmIsCompositionEnabled) { + pDwmIsCompositionEnabled(&os_dwm_enabled); + } + FreeLibrary(dwmapihandle); + } + } + + return 1; } diff --git a/od-win32/win32.h b/od-win32/win32.h index 38d7f876..48877880 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #define LANG_DLL_FULL_VERSION_MATCH 0 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("2") +#define WINUAEBETA _T("3") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2015, 12, 13) +#define WINUAEDATE MAKEBD(2015, 12, 16) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") @@ -92,6 +92,7 @@ extern int framecnt; extern TCHAR VersionStr[256]; extern TCHAR BetaStr[64]; extern int os_admin, os_64bit, os_vista, os_win7, cpu_number, os_touch; +extern BOOL os_dwm_enabled; extern OSVERSIONINFO osVersion; extern int paraport_mask; extern int gui_active; diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 31885570..9cc2d6b9 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -1093,14 +1093,16 @@ bool render_screen (bool immediate) int cnt; render_ok = false; - if (minimized || picasso_on || monitor_off || dx_islost ()) + if (minimized || picasso_on || monitor_off || dx_islost ()) { return render_ok; + } cnt = 0; while (wait_render) { sleep_millis (1); cnt++; - if (cnt > 500) + if (cnt > 500) { return render_ok; + } } flushymin = 0; flushymax = currentmode->amiga_height; diff --git a/od-win32/winuae_msvc14/winuae_msvc.vcxproj b/od-win32/winuae_msvc14/winuae_msvc.vcxproj index 35be5ec8..3cd8e653 100644 --- a/od-win32/winuae_msvc14/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc14/winuae_msvc.vcxproj @@ -671,7 +671,7 @@ 2621440 true true - false + true UseLinkTimeCodeGeneration true false diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 00b4e544..904919ac 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,11 @@ +Beta 3: + +- Debugger thought slow ram was IO region if ECS Agnus. +- CDTV-CR mode CD led didn't flash when reading data, only when playing audio. +- Fixed linestate array buffer underrun if mode was interlaced. Most common side-effect was blanked + screen in interlaced modes, especially in fields or fields+ mode, if build was full optimized. + Beta 2: - SASI/SASI (CHS) options were not visible in GUI when listing SASI controllers. -- 2.47.3