From 1d1464d5a136710f6573679421df6e6e4dc20249 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 25 Sep 2016 18:10:13 +0300 Subject: [PATCH] 3400b9 --- cfgfile.cpp | 10 +- gfxboard.cpp | 10 +- inputdevice.cpp | 21 +++- memory.cpp | 6 +- od-win32/resources/resource.h | 1 + od-win32/resources/winuae.rc | 11 +- od-win32/win32.cpp | 3 +- od-win32/win32.h | 4 +- od-win32/win32gui.cpp | 219 +++++++++++++++++++++++++++++++--- od-win32/winuaechangelog.txt | 15 +++ 10 files changed, 262 insertions(+), 38 deletions(-) diff --git a/cfgfile.cpp b/cfgfile.cpp index 2c1c85ca..29081c5a 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -5199,7 +5199,13 @@ void cfgfile_compatibility_rtg(struct uae_prefs *p) for (int j = i; j < MAX_RTG_BOARDS; j++) { rtgs[j] = 1; if (gfxboard_get_romtype(&p->rtgboards[j]) == romtype) { - addbcromtype(p, romtype, true, NULL, devnum); + TCHAR *romname = NULL; + if (romtype == ROMTYPE_PICASSOIV) { + romname = p->picassoivromfile; + } else if (romtype == ROMTYPE_x86_VGA) { + romname = _T(""); + } + addbcromtype(p, romtype, romname, NULL, devnum); devnum++; } } @@ -6877,7 +6883,7 @@ void default_prefs (struct uae_prefs *p, bool reset, int type) p->input_tablet = TABLET_OFF; p->tablet_library = false; - p->input_mouse_untrap = MOUSEUNTRAP_NONE; + p->input_mouse_untrap = MOUSEUNTRAP_MIDDLEBUTTON; p->input_magic_mouse_cursor = 0; inputdevice_default_prefs (p); diff --git a/gfxboard.cpp b/gfxboard.cpp index 353545ea..e151a510 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -385,8 +385,9 @@ static void init_board (struct rtggfxboard *gb) gb->vga_width = 0; mapped_free(gb->gfxmem_bank); gb->vram_start_offset = 0; - if (ISP4() && !gb->p4z2) // JIT direct compatibility hack + if (ISP4() && !gb->p4z2) { // JIT direct compatibility hack gb->vram_start_offset = 0x01000000; + } vramsize += gb->vram_start_offset; xfree (gb->fakesurface_surface); gb->fakesurface_surface = xmalloc (uae_u8, 4 * 10000); @@ -408,7 +409,7 @@ static void init_board (struct rtggfxboard *gb) gb->vramrealstart = gb->vram; gb->vram += gb->vram_start_offset; gb->vramend += gb->vram_start_offset; - gb->gfxmem_bank->baseaddr = gb->vram; + //gb->gfxmem_bank->baseaddr = gb->vram; // restore original value because this is checked against // configured size in expansion.cpp gb->gfxmem_bank->allocated_size = rbc->rtgmem_size; @@ -623,6 +624,7 @@ static bool gfxboard_setmode_qemu(struct rtggfxboard *gb) RGBFTYPE t = (RGBFTYPE)i; if (GetBytesPerPixel(t) == bpp / 8) { mode.mode = t; + break; } } gfxboard_setmode(gb, &mode); @@ -1530,10 +1532,10 @@ static rtggfxboard *getgfxboard(uaecptr addr) if (only_gfx_board) return only_gfx_board; if (lastgetgfxboard) { - if (addr >= lastgetgfxboard->io_start && addr < lastgetgfxboard->io_end) - return lastgetgfxboard; if (addr >= lastgetgfxboard->mem_start[0] && addr < lastgetgfxboard->mem_end[0]) return lastgetgfxboard; + if (addr >= lastgetgfxboard->io_start && addr < lastgetgfxboard->io_end) + return lastgetgfxboard; if (addr >= lastgetgfxboard->mem_start[1] && addr < lastgetgfxboard->mem_end[1]) return lastgetgfxboard; lastgetgfxboard = NULL; diff --git a/inputdevice.cpp b/inputdevice.cpp index dc374abe..908ca5fb 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -75,7 +75,7 @@ int inputdevice_logging = 0; extern int tablet_log; -#define COMPA_RESERVED_FLAGS ID_FLAG_INVERT +#define COMPA_RESERVED_FLAGS (ID_FLAG_INVERT) #define ID_FLAG_CANRELEASE 0x1000 #define ID_FLAG_TOGGLED 0x2000 @@ -1176,7 +1176,9 @@ static void setcompakbevent(struct uae_prefs *p, struct uae_input_device *uid, i uid->port[l][0] = port + 1; xfree(uid->custom[l][0]); uid->custom[l][0] = NULL; - setautofireevent(uid, l, 0, af, port); + if (!JSEM_ISCUSTOM(port, p)) { + setautofireevent(uid, l, 0, af, port); + } } static int matchdevice(struct inputdevice_functions *inf, const TCHAR *configname, const TCHAR *name) @@ -1729,6 +1731,8 @@ static void generate_jport_custom_item(struct uae_input_device *uid, int num, in _stprintf(p, _T("%c.%d.a.%d"), type, num, i - ID_AXIS_OFFSET); } } + TCHAR *p3 = p + _tcslen(p); + _stprintf(p3, _T(".%d"), (int)(flags & (ID_FLAG_AUTOFIRE | ID_FLAG_TOGGLE | ID_FLAG_INVERTTOGGLE | ID_FLAG_INVERT))); if (flags & ID_FLAG_SAVE_MASK_QUALIFIERS) { TCHAR *p2 = p + _tcslen(p); *p2++ = '.'; @@ -1866,6 +1870,11 @@ void inputdevice_parse_jport_custom(struct uae_prefs *pr, int index, int port, T } } + int flags = 0; + if (*bufp2 != '=') { + flags = getnum(&bufp2); + } + while (*bufp2 != '=' && *bufp2 != 0) bufp2++; if (*bufp2 == 0) @@ -1901,13 +1910,13 @@ void inputdevice_parse_jport_custom(struct uae_prefs *pr, int index, int port, T for (int i = 0; i < MAX_INPUT_DEVICES; i++) { id = &pr->keyboard_settings[pr->input_selected_setting][i]; if (i == 0 || id->enabled) { - setcompakbevent(pr, id, num, evt, port, 0, ID_FLAG_GAMEPORTSCUSTOM_MASK); + setcompakbevent(pr, id, num, evt, port, 0, ID_FLAG_GAMEPORTSCUSTOM_MASK | flags); } } } } else { if (port >= 0) { - inputdevice_set_gameports_mapping(pr, devnum, num, evt, IDEV_MAPPED_GAMEPORTSCUSTOM1 | IDEV_MAPPED_GAMEPORTSCUSTOM2, port, pr->input_selected_setting); + inputdevice_set_gameports_mapping(pr, devnum, num, evt, IDEV_MAPPED_GAMEPORTSCUSTOM1 | IDEV_MAPPED_GAMEPORTSCUSTOM2 | flags, port, pr->input_selected_setting); } if (evt == INPUTEVENT_JOY1_FIRE_BUTTON || evt == INPUTEVENT_JOY2_FIRE_BUTTON) { if (joystick > 0) @@ -6007,7 +6016,7 @@ static void cleardev (struct uae_input_device *uid, int num) inputdevice_sparecopy (&uid[num], i, 0); for (int j = 0; j < MAX_INPUT_SUB_EVENT; j++) { uid[num].eventid[i][j] = 0; - uid[num].flags[i][j] = 0; + uid[num].flags[i][j] &= ID_FLAG_AUTOFIRE_MASK; xfree (uid[num].custom[i][j]); uid[num].custom[i][j] = NULL; } @@ -6113,6 +6122,8 @@ static void setautofires (struct uae_prefs *prefs, int port, int af) if (rp_isactive ()) return; #endif + if (JSEM_ISCUSTOM(port, prefs)) + return; for (int l = 0; l < MAX_INPUT_DEVICES; l++) { setautofire (&joysticks[l], port, af); setautofire (&mice[l], port, af); diff --git a/memory.cpp b/memory.cpp index 18f2a12f..bca4f21d 100644 --- a/memory.cpp +++ b/memory.cpp @@ -2841,8 +2841,12 @@ static void ppc_generate_map_banks(addrbank *bank, int start, int size) ab = ab2; } } else { + uae_u8 *baseaddr = bank->baseaddr; + if (baseaddr) { + baseaddr += bankaddr - bank->start; + } // ABFLAG_PPCIOSPACE = map as indirect even if baseaddr is non-NULL - ppc_map_banks(bankaddr, banksize, bank->name, (bank->flags & ABFLAG_PPCIOSPACE) ? NULL: bank->baseaddr, bank == &dummy_bank); + ppc_map_banks(bankaddr, banksize, bank->name, (bank->flags & ABFLAG_PPCIOSPACE) ? NULL: baseaddr, bank == &dummy_bank); } } #endif diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index ada084d8..c2656833 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -1229,6 +1229,7 @@ #define IDC_INPUTMAP_EXIT 1824 #define IDC_INPUTMAPADD 1825 #define IDC_TAPELIST 1826 +#define IDC_INPUTMAP_SPECIALS 1826 #define IDC_NEW_TAPEPATH 1827 #define IDC_TAPEINFO 1828 #define IDC_TAPE_PATH_NAME 1829 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 5f36aaff..50c24a6e 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -534,7 +534,7 @@ BEGIN GROUPBOX "Mouse extra settings",IDC_STATIC,1,219,393,68 RTEXT "Mouse speed:",IDC_STATIC,13,237,70,10,SS_CENTERIMAGE EDITTEXT IDC_INPUTSPEEDM,97,237,25,13,ES_NUMBER - RTEXT "Magic Mouse cursor mode:",IDC_STATIC,143,254,110,10,SS_CENTERIMAGE + RTEXT "Magic Mouse cursor mode:",IDC_STATIC,143,253,110,10,SS_CENTERIMAGE COMBOBOX IDC_PORT_TABLET_CURSOR,268,251,119,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Install virtual mouse driver",IDC_PORT_TABLET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,270,116,11 CONTROL "Full tablet input emulation",IDC_PORT_TABLET_FULL, @@ -544,7 +544,7 @@ BEGIN CONTROL "Mouse/Joystick autoswitching [] Press button to automatically insert inactive input device in to joystick/mouse port",IDC_PORT_AUTOSWITCH, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,136,102,172,11 COMBOBOX IDC_MOUSE_UNTRAPMODE,268,234,119,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - RTEXT "Mouse untrap mode:",IDC_STATIC,143,239,110,10,SS_CENTERIMAGE + RTEXT "Mouse untrap mode:",IDC_STATIC,143,237,110,10,SS_CENTERIMAGE END IDD_CONTRIBUTORS DIALOGEX 0, 0, 530, 345 @@ -1190,13 +1190,14 @@ BEGIN CONTROL "",IDC_INPUTMAPLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,1,418,257 EDITTEXT IDC_INPUTMAPOUT,1,261,418,14,ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED EDITTEXT IDC_INPUTMAPOUTM,1,277,418,29,ES_MULTILINE | ES_READONLY | WS_DISABLED - COMBOBOX IDC_INPUTMAPADD,2,309,331,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Add Event",IDC_INPUTMAP_CUSTOM,338,309,79,14 + COMBOBOX IDC_INPUTMAPADD,2,309,247,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Add Event",IDC_INPUTMAP_CUSTOM,253,308,79,14 PUSHBUTTON "Test",IDC_INPUTMAP_TEST,1,325,80,14 PUSHBUTTON "Remap",IDC_INPUTMAP_CAPTURE,85,325,80,14 PUSHBUTTON "Delete",IDC_INPUTMAP_DELETE,169,325,80,14 PUSHBUTTON "Delete all",IDC_INPUTMAP_DELETEALL,253,325,80,14 PUSHBUTTON "Exit",IDC_INPUTMAP_EXIT,338,325,79,14 + PUSHBUTTON "Autofire",IDC_INPUTMAP_SPECIALS,338,308,79,14 END IDD_INFOBOX DIALOGEX 0, 0, 420, 68 @@ -1213,7 +1214,7 @@ END IDD_LIST DIALOGEX 0, 0, 316, 206 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Select Qualifiers" +CAPTION "Options" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,205,185,50,14 diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index cf61f70b..899f561a 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -3798,7 +3798,8 @@ int target_parse_option (struct uae_prefs *p, const TCHAR *option, const TCHAR * bool tbool; if (cfgfile_yesno(option, value, _T("middle_mouse"), &tbool)) { - p->input_mouse_untrap |= MOUSEUNTRAP_MIDDLEBUTTON; + if (tbool) + p->input_mouse_untrap |= MOUSEUNTRAP_MIDDLEBUTTON; return 1; } diff --git a/od-win32/win32.h b/od-win32/win32.h index 9fc1bbb0..347f5f3a 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("8") +#define WINUAEBETA _T("9") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2016, 9, 24) +#define WINUAEDATE MAKEBD(2016, 9, 25) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index df4a335f..5b041033 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -264,6 +264,8 @@ static void setfocus (HWND hDlg, int id) } static void ew (HWND hDlg, DWORD id, int enable) { + if (id == -1) + return; HWND w = GetDlgItem (hDlg, id); if (!w) return; @@ -274,7 +276,7 @@ static void ew (HWND hDlg, DWORD id, int enable) static void hide (HWND hDlg, DWORD id, int hide) { HWND w; - if (id < 0) + if (id == -1) return; w = GetDlgItem (hDlg, id); if (!w) @@ -3884,7 +3886,9 @@ static void update_listview_input (HWND hDlg) static int inputmap_port = -1, inputmap_port_remap = -1; static int inputmap_groupindex[MAX_COMPA_INPUTLIST + 1]; -static int inputmap_handle (HWND list, int currentdevnum, int currentwidgetnum, int *inputmap_portp, int *inputmap_indexp, int state, int *inputmap_itemindexp, int deleteindex) +static int inputmap_handle (HWND list, int currentdevnum, int currentwidgetnum, + int *inputmap_portp, int *inputmap_indexp, + int state, int *inputmap_itemindexp, int deleteindex, uae_u64 flags_or, uae_u64 flags_and, uae_u64 *inputmap_flagsp) { int cntitem, cntgroup, portnum; int mode; @@ -3949,15 +3953,27 @@ static int inputmap_handle (HWND list, int currentdevnum, int currentwidgetnum, for (int j = 0; j < inputdevice_get_widget_num (devnum); j++) { for (int sub = 0; sub < MAX_INPUT_SUB_EVENT; sub++) { int port; - int evtnum2 = inputdevice_get_mapping (devnum, j, &flags, &port, NULL, NULL, sub); + int evtnum2 = inputdevice_get_mapping (devnum, j, &flags, &port, name, NULL, sub); if (evtnum2 == evtnum) { if (port - 1 != portnum) continue; if (cntitem - 1 == deleteindex) { - inputdevice_set_mapping (devnum, j, NULL, NULL, 0, 0, sub); - deleteindex = -1; - found = true; - continue; + if (!flags_or && !flags_and && !inputmap_flagsp) { + inputdevice_set_mapping (devnum, j, NULL, NULL, 0, 0, sub); + deleteindex = -1; + found = true; + continue; + } else { + if (flags_or || flags_and) { + flags &= ~flags_and; + flags |= flags_or; + inputdevice_set_mapping(devnum, j, name, NULL, flags, port, sub); + } else { + *inputmap_flagsp = flags; + } + found = true; + found2 = true; + } } if (list) { inputdevice_get_widget_type (devnum, j, name); @@ -3965,20 +3981,32 @@ static int inputmap_handle (HWND list, int currentdevnum, int currentwidgetnum, _tcscpy (target, name); _tcscat (target, _T(", ")); _tcscat (target, inputdevice_get_device_name2 (devnum)); + + if (flags & IDEV_MAPPED_AUTOFIRE_SET) { + _tcscat(target, _T(" [")); + _tcscat(target, _T("Autofire")); + if (flags & IDEV_MAPPED_TOGGLE) + _tcscat(target, _T(" (toggle)")); + else if (flags & IDEV_MAPPED_INVERTTOGGLE) + _tcscat(target, _T(" (always)")); + _tcscat(target, _T("]")); + } + lvstruct.pszText = target; lvstruct.iItem = cntgroup * 256 + cntitem; - item = ListView_InsertItem (list, &lvstruct); + item = ListView_InsertItem(list, &lvstruct); + if (inputmap_itemindexp && inputmap_itemindexp[cntgroup - 1] < 0) inputmap_itemindexp[cntgroup - 1] = item; - } else if (currentdevnum == devnum) { - if (currentwidgetnum == j) { + } else if (currentdevnum == devnum && currentwidgetnum == j) { + if (inputmap_portp) *inputmap_portp = portnum; + if (inputmap_indexp) *inputmap_indexp = cntitem - 1; - found2 = true; - if (state < 0) - return 1; - state = -1; - } + found2 = true; + if (state < 0) + return 1; + state = -1; } cntitem++; found = true; @@ -4018,7 +4046,7 @@ static void update_listview_inputmap (HWND hDlg, int deleteindex) ListView_EnableGroupView (list, TRUE); - inputmap_handle (list, -1, -1, NULL, NULL, 0, inputmap_groupindex, deleteindex); + inputmap_handle (list, -1, -1, NULL, NULL, 0, inputmap_groupindex, deleteindex, 0, 0, NULL); } static int clicked_entry = -1; @@ -14810,6 +14838,8 @@ static void updatejoyport (HWND hDlg, int changedport) SendDlgItemMessage (hDlg, joysaf[i], CB_SETCURSEL, workprefs.jports[i].autofire, 0); ew(hDlg, joyremap[i], idx >= 2); + ew(hDlg, joysm[i], idx >= 2); + ew(hDlg, joysaf[i], !JSEM_ISCUSTOM(i, &workprefs) && idx >= 2); } } @@ -15841,6 +15871,7 @@ static int rawmode; static int inputmap_remap_counter, inputmap_view_offset; static int inputmap_remap_event; static int inputmap_mode_cnt; +static int inputmap_selected; static bool inputmap_oneshot; #define INPUTMAP_F12 -1 @@ -16102,7 +16133,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw bool found = false; HWND h = GetDlgItem (hDlg, IDC_INPUTMAPLIST); int op = inputmap_port; - if (inputmap_handle (NULL, input_selected_device, input_selected_widget, &op, &inputmap_index, state, NULL, -1)) { + if (inputmap_handle (NULL, input_selected_device, input_selected_widget, &op, &inputmap_index, state, NULL, -1, 0, 0, NULL)) { if (op == inputmap_port) { ListView_EnsureVisible (h, 1, FALSE); ListView_EnsureVisible (h, inputmap_index, FALSE); @@ -16354,13 +16385,153 @@ static void fillinputmapadd (HWND hDlg) } } +struct remapcustoms_s +{ + uae_u64 flags; + uae_u64 mask; + const TCHAR *name; +}; +static const struct remapcustoms_s remapcustoms[] = +{ + { 0, IDEV_MAPPED_AUTOFIRE_SET | IDEV_MAPPED_TOGGLE | IDEV_MAPPED_INVERTTOGGLE, + _T("No autofire") }, + { IDEV_MAPPED_AUTOFIRE_SET, IDEV_MAPPED_AUTOFIRE_SET | IDEV_MAPPED_TOGGLE | IDEV_MAPPED_INVERTTOGGLE, + _T("Autofire on") }, + { IDEV_MAPPED_AUTOFIRE_SET | IDEV_MAPPED_TOGGLE, IDEV_MAPPED_AUTOFIRE_SET | IDEV_MAPPED_TOGGLE | IDEV_MAPPED_INVERTTOGGLE, + _T("Autofire on (toggle)") }, + { IDEV_MAPPED_AUTOFIRE_SET | IDEV_MAPPED_INVERTTOGGLE, IDEV_MAPPED_AUTOFIRE_SET | IDEV_MAPPED_TOGGLE | IDEV_MAPPED_INVERTTOGGLE, + _T("Autofire on (always)") }, + { NULL } +}; + +static void remapspeciallistview(HWND list) +{ + uae_u64 flags = 0; + inputmap_handle(NULL, -1, -1, NULL, NULL, -1, NULL, inputmap_selected, 0, 0, &flags); + + ListView_DeleteAllItems(list); + + for (int i = 0; remapcustoms[i].name; i++) { + const struct remapcustoms_s *rc = &remapcustoms[i]; + TCHAR tmp[MAX_DPATH]; + _tcscpy(tmp, rc->name); + LV_ITEM lvi = { 0 }; + lvi.mask = LVIF_TEXT | LVIF_PARAM; + lvi.pszText = tmp; + lvi.lParam = 0; + lvi.iItem = i; + lvi.iSubItem = 0; + ListView_InsertItem(list, &lvi); + + tmp[0] = 0; + if ((flags & rc->mask) == rc->flags) { + _tcscpy(tmp, _T("*")); + } + + ListView_SetItemText(list, i, 1, tmp); + + } +} + +static INT_PTR CALLBACK RemapSpecialsProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + static int recursive = 0; + HWND list = GetDlgItem(hDlg, IDC_LISTDIALOG_LIST); + + + switch (msg) + { + case WM_INITDIALOG: + { + recursive++; + + int lvflags = LVS_EX_DOUBLEBUFFER | LVS_EX_ONECLICKACTIVATE | LVS_EX_UNDERLINEHOT | LVS_EX_FULLROWSELECT; + ListView_SetExtendedListViewStyleEx(list, lvflags, lvflags); + + LV_COLUMN lvc = { 0 }; + + lvc.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM; + lvc.iSubItem = 0; + lvc.fmt = LVCFMT_LEFT; + lvc.pszText = _T("Option"); + lvc.cx = 150; + ListView_InsertColumn(list, 0, &lvc); + lvc.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM; + lvc.iSubItem = 1; + lvc.fmt = LVCFMT_LEFT; + lvc.pszText = _T("Selection"); + lvc.cx = 150; + ListView_InsertColumn(list, 1, &lvc); + + + remapspeciallistview(list); + + recursive--; + } + return TRUE; + + case WM_NOTIFY: + if (((LPNMHDR)lParam)->idFrom == IDC_LISTDIALOG_LIST) + { + TCHAR name[256]; + int column, entry; + NM_LISTVIEW *nmlistview = (NM_LISTVIEW *)lParam; + list = nmlistview->hdr.hwndFrom; + switch (nmlistview->hdr.code) + { + case NM_RCLICK: + case NM_CLICK: + { + entry = listview_entry_from_click(list, &column); + if (entry >= 0 && inputmap_selected >= 0) { + int devnum, num, sub; + if (inputmap_handle(NULL, -1, -1, NULL, NULL, -1, NULL, inputmap_selected, + remapcustoms[entry].flags, IDEV_MAPPED_AUTOFIRE_SET | IDEV_MAPPED_TOGGLE | IDEV_MAPPED_INVERTTOGGLE, NULL)) { + inputdevice_generate_jport_custom(&workprefs, inputmap_port); + EndDialog(hDlg, 1); + } + } + } + break; + } + } + break; + case WM_COMMAND: + if (recursive) + break; + recursive++; + + switch (wParam) + { + case IDC_LISTDIALOG_CLEAR: + { + break; + } + case IDOK: + EndDialog(hDlg, 1); + break; + case IDCANCEL: + EndDialog(hDlg, 0); + break; + } + recursive--; + break; + } + return FALSE; +} + +static void input_remapspecials(HWND hDlg) +{ + CustomDialogBox(IDD_LIST, hDlg, RemapSpecialsProc); +} + static INT_PTR CALLBACK InputMapDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { static int recursive; - static int inputmap_selected; HWND h = GetDlgItem (hDlg, IDC_INPUTMAPLIST); TCHAR tmp[256]; int i; + int inputmapselected_old = inputmap_selected; switch (msg) { @@ -16372,15 +16543,19 @@ static INT_PTR CALLBACK InputMapDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA inputmap_port_remap = -1; inputmap_remap_counter = -1; inputmap_view_offset = 0; + inputmap_selected = -1; pages[INPUTMAP_ID] = hDlg; fillinputmapadd (hDlg); inputdevice_updateconfig (NULL, &workprefs); InitializeListView (hDlg); + ew(hDlg, IDC_INPUTMAP_SPECIALS, inputmap_selected >= 0); if (!JSEM_ISCUSTOM(inputmap_port, &workprefs)) { ew(hDlg, IDC_INPUTMAP_CAPTURE, FALSE); ew(hDlg, IDC_INPUTMAP_DELETE, FALSE); ew(hDlg, IDC_INPUTMAP_DELETEALL, FALSE); ew(hDlg, IDC_INPUTMAP_CUSTOM, FALSE); + ew(hDlg, IDC_INPUTMAP_SPECIALS, FALSE); + ew(hDlg, IDC_INPUTMAPADD, FALSE); } break; } @@ -16405,6 +16580,8 @@ static INT_PTR CALLBACK InputMapDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA if (JSEM_ISCUSTOM(inputmap_port, &workprefs)) { input_find (hDlg, hDlg, 1, true, true); } + if (inputmapselected_old < 0) + ew(hDlg, IDC_INPUTMAP_SPECIALS, TRUE); } return TRUE; @@ -16412,6 +16589,8 @@ static INT_PTR CALLBACK InputMapDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA if (lv->iItem >= 0) { inputmap_selected = lv->iItem; inputmap_remap_counter = getremapcounter (lv->iItem); + if (inputmapselected_old < 0) + ew(hDlg, IDC_INPUTMAP_SPECIALS, TRUE); } return TRUE; } @@ -16448,6 +16627,10 @@ static INT_PTR CALLBACK InputMapDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA ListView_SetItemState (h, inputmap_remap_counter, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); input_find (hDlg, hDlg, 1, true, false); break; + case IDC_INPUTMAP_SPECIALS: + input_remapspecials(hDlg); + InitializeListView(hDlg); + break; case IDC_INPUTMAP_CUSTOM: tmp[0] = 0; SendDlgItemMessage (hDlg, IDC_INPUTMAPADD, WM_GETTEXT, (WPARAM)sizeof tmp / sizeof (TCHAR), (LPARAM)tmp); diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 0d0c2707..0ea65115 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -5,6 +5,20 @@ 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 9: + +- Untrap = middle mouse button default was wrong and setting was nearly always incorrectly loaded from config file. (b8) +- Added SCSI+IDE, SCSI only and IDE only Dataflyer Plus options. (SCSI+IDE = default) +- Game Ports panel Remap/test option now supports button-specific autofire configuration. Main Game Ports panel autofire option is + now ignored when any custom slot is selected. Other confusing Input panel options may be moved later here with more logical grouping. + Does not yet hide options that are not compatible with selected input event. +- Orphaned (no bridgeboard configured) x86 VGA board caused bogus error message at starup. +- Enabling Picasso IV added incorrectly "NOROM" ROM type to Expansions panel. +- For some reason QEMU Cirrus Logic code only stored chip model when initialized for the first time, this caused graphics glitches + if any 4M board was initialized after 2M or smaller board. For example Picasso IV + x86 VGA. +- JIT Direct + Picasso IV Z3 was broken in recent beta. +- Added Expansion Systems Dataflyer Plus boot ROM v1.5 and v1.7 to ROM scanner. (v2.1 was added in b8) + Beta 8: - Do not initiate disk eject+reinsert sequence when changing write protection state that requires saveimage and emulation has not @@ -23,6 +37,7 @@ Beta 8: - Expansion Systems Dataflyer Plus SCSI/IDE controller emulated. (Not same as Dataflyer SCSI Plus which is A1200/A4000 IDE port SCSI adapter) - Moved middle button untrap and "magic mouse" untrap/mouse sync to single select menu in gameports panel. (Misc panel middle button is kept because it is commonly used but now it only changes gameports option) +- Release all Amiga keys only when mode changes and window needs to be closed and opened (for example fullscreen<>windowed change) Expansion Systems Dataflyer Plus: - SCSI-only, IDE-only or SCSI+IDE configuration. -- 2.47.3