From 47a4fedff7a873ef09524feb78834458dccf5c41 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 27 Aug 2017 18:29:37 +0300 Subject: [PATCH] 3600b3 --- expansion.cpp | 1 + od-win32/fsdb_win32.cpp | 2 +- od-win32/win32.cpp | 40 ++++++++++++++++++++++++++++++++++++ od-win32/win32.h | 4 ++-- od-win32/win32gfx.cpp | 2 +- od-win32/winuaechangelog.txt | 16 +++++++++++++++ 6 files changed, 61 insertions(+), 4 deletions(-) diff --git a/expansion.cpp b/expansion.cpp index d107f431..2022256e 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -1352,6 +1352,7 @@ static addrbank *expamem_map_uaeboard(struct autoconfig_info *aci) if (currprefs.uaeboard > 1) { rtarea_bank.start = uaeboard_base + 65536; map_banks_z2(&rtarea_bank, (uaeboard_base + 65536) >> 16, 1); + ce_cachable[(uaeboard_base + 65536) >> 16] = CACHE_DISABLE_ALLOCATE; } return &uaeboard_bank; } diff --git a/od-win32/fsdb_win32.cpp b/od-win32/fsdb_win32.cpp index 31a0203e..70bfa415 100644 --- a/od-win32/fsdb_win32.cpp +++ b/od-win32/fsdb_win32.cpp @@ -366,7 +366,7 @@ static int fsdb_name_invalid_2 (a_inode *aino, const TCHAR *n, int dir) xfree(p); if (h != INVALID_HANDLE_VALUE && type != FILE_TYPE_DISK) return 1; - if (err == ERROR_INVALID_NAME || err == ERROR_ACCESS_DENIED) + if (err == ERROR_INVALID_NAME || err == ERROR_ACCESS_DENIED || err == ERROR_INVALID_HANDLE) return 1; return 0; } diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 35288152..3d8e3dad 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -12,6 +12,7 @@ #define MOUSECLIP_HIDE 1 #define TOUCH_SUPPORT 1 #define TOUCH_DEBUG 1 +#define KBHOOK 0 #include #include @@ -145,6 +146,9 @@ HINSTANCE hInst = NULL; HMODULE hUIDLL = NULL; HWND (WINAPI *pHtmlHelp)(HWND, LPCWSTR, UINT, LPDWORD) = NULL; HWND hAmigaWnd, hMainWnd, hHiddenWnd, hGUIWnd; +#if KBHOOK +static HHOOK hhook; +#endif RECT amigawin_rect, mainwin_rect; static RECT amigawinclip_rect; int setcursoroffset_x, setcursoroffset_y; @@ -687,6 +691,30 @@ void updatewinrect (bool allowfullscreen) } } +#if KBHOOK +static bool HasAltModifier(int flags) +{ + return (flags & 0x20) == 0x20; +} + +static LRESULT CALLBACK captureKey(int nCode, WPARAM wp, LPARAM lp) +{ + if (nCode >= 0) + { + KBDLLHOOKSTRUCT *kbd = (KBDLLHOOKSTRUCT*)lp; + DWORD vk = kbd->vkCode; + DWORD flags = kbd->flags; + + // Disabling Windows keys + + if (vk == VK_RWIN || vk == VK_LWIN || (vk == VK_TAB && HasAltModifier(flags))) { + return 1; + } + } + return CallNextHookEx(hhook, nCode, wp, lp); +} +#endif + static bool iswindowfocus (void) { bool donotfocus = false; @@ -803,7 +831,19 @@ static void setmouseactive2 (int active, bool allowpause) resumesoundpaused (); } setmaintitle (hMainWnd); +#if KBHOOK + if (!hhook) { + hhook = SetWindowsHookEx(WH_KEYBOARD_LL, captureKey, GetModuleHandle(NULL), 0); + } +#endif + } else { +#if KBHOOK + if (hhook) { + UnhookWindowsHookEx(hhook); + hhook = NULL; + } +#endif inputdevice_acquire (FALSE); } if (!active && allowpause) { diff --git a/od-win32/win32.h b/od-win32/win32.h index 5c0b3c85..1d09bbb6 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("2") +#define WINUAEBETA _T("3") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2017, 8, 16) +#define WINUAEDATE MAKEBD(2017, 8, 27) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index d9f92e56..89a6ea0a 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -2146,7 +2146,7 @@ int check_prefs_changed_gfx (void) c |= currprefs.gfx_apmode[APMODE_RTG].gfx_backbuffers != changed_prefs.gfx_apmode[APMODE_RTG].gfx_backbuffers ? (2 | 8) : 0; c |= currprefs.win32_main_alwaysontop != changed_prefs.win32_main_alwaysontop ? 32 : 0; - c |= currprefs.win32_gui_alwaysontop != changed_prefs.win32_gui_alwaysontop ? 32 : 0; + c |= currprefs.win32_gui_alwaysontop != changed_prefs.win32_gui_alwaysontop ? 2 : 0; c |= currprefs.win32_notaskbarbutton != changed_prefs.win32_notaskbarbutton ? 32 : 0; c |= currprefs.win32_nonotificationicon != changed_prefs.win32_nonotificationicon ? 32 : 0; c |= currprefs.win32_borderless != changed_prefs.win32_borderless ? 32 : 0; diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 487a164e..ceac0256 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -4,6 +4,22 @@ JIT Direct current rules are less complex now. It automatically switches off onl - RTG VRAM is outside of reserved natmem space. Workaround: Move RTG in earlier position using Hardware info GUI panel. Note that in 64-bit version RTG VRAM must be inside of reserved natmem space. (Outside = error message and return back to GUI) +Beta 3: + +- 68030 data cache + indirect UAE Boot ROM will now always work, even without MMU. UAE Boot ROM address space now forces all caching off, even if write-allocate is enabled. +- 68030 hardware cache inhibit signal is now also emulated in non-MMU/EC modes, making data cache emulation usable in this mode. +- Identity save option ignored user selected file name and path. +- Read identity button didn't support ATAPI devices correctly, it only worked if ATAPI device appeared as SCSI or "RAID" device. +- Activate DTR and RTS when uaeserial.device is opened to match serial.device behavior. +- Serial port emulation to PC serial port reset DTR (and RTS state if RTS/CTS was unticked) when baud rate changed. +- Disassembler now also shows data in memory, makes step by step tracing less annoying, for example "CMP.W (A4)+ [2f09],D2". Not shown if address is not plain RAM or ROM. +- Assembler BSR fixed. +- uaenet.device didn't close low level ethernet handles when Amiga was reset, causing duplicate packets. +- 68020 CE statefiles created with 3.5 or older should load normally again. +- UAE controller hardfile custom unit number selection didn't work if unit numbers had gaps. +- Do not re-open main window when GUI on top option is changed. +- uaeserial.device crash, broken when OS4 compatible trap system was added. + Beta 2: - Read Identity and floppy drive bootblock font size ignored DPI setting. -- 2.47.3