int win32_active_capture_priority;
bool win32_active_nocapture_pause;
bool win32_active_nocapture_nosound;
+ int win32_active_input;
int win32_inactive_priority;
bool win32_inactive_pause;
bool win32_inactive_nosound;
if (rp_isactive ())
return;
#endif
+ if (!istest && !mouseactive && !(currprefs.win32_active_input & 4)) {
+ return;
+ }
+
if (num < num_joystick) {
rawdata = (PCHAR)hid->bRawData;
return;
if (isfocus () < 2 && currprefs.input_tablet >= TABLET_MOUSEHACK && (currprefs.input_mouse_untrap & MOUSEUNTRAP_MAGIC))
return;
+ if (!mouseactive && !(currprefs.win32_active_input & 1)) {
+ if ((currprefs.win32_guikey <= 0 && scancode == DIK_F12) || (scancode == currprefs.win32_guikey)) {
+ inputdevice_add_inputcode(AKS_ENTERGUI, 1, NULL);
+ }
+ return;
+ }
if (pressed) {
di_keycodes[num][scancode] = 1;
} else {
if (rp_isactive ())
return;
#endif
+ if (!istest && !mouseactive && !(currprefs.win32_active_input & 4)) {
+ return;
+ }
for (i = 0; i < MAX_INPUT_DEVICES; i++) {
struct didata *did = &di_joystick[i];
#define IDC_ACTIVE_NOSOUND 1535
#define IDC_STATECLEAR 1536
#define IDC_MINIMIZED_NOJOY 1537
+#define IDC_ACTIVE_NOJOY 1538
+#define IDC_ACTIVE_NOKEYBOARD 1539
#define IDC_SER_SHARED 1553
#define IDC_GUI_RESIZE 1553
#define IDC_SER_CTSRTS 1554
STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "When Active",IDC_STATIC,1,24,125,105
+ GROUPBOX "When Active",IDC_STATIC,1,24,125,119
CTEXT "Run at priority:",IDC_ACTIVE_PRI,10,35,108,10,SS_CENTERIMAGE | WS_TABSTOP
COMBOBOX IDC_ACTIVE_PRIORITY,10,50,108,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CTEXT "Mouse uncaptured:",IDC_STATIC,10,67,101,15,SS_CENTERIMAGE
CONTROL "Pause emulation",IDC_ACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,84,109,10
CONTROL "Disable sound",IDC_ACTIVE_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,98,109,10
- GROUPBOX "When Inactive",IDC_STATIC,133,24,126,105
+ GROUPBOX "When Inactive",IDC_STATIC,133,24,126,119
CTEXT "Run at priority:",IDC_INACTIVE_PRI,144,35,107,10,SS_CENTERIMAGE | WS_TABSTOP
COMBOBOX IDC_INACTIVE_PRIORITY,144,50,108,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Pause emulation",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,143,84,109,10
CONTROL "Disable sound",IDC_INACTIVE_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,143,98,109,10
CONTROL "Disable game controllers",IDC_INACTIVE_NOJOY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,143,112,109,10
- GROUPBOX "When Minimized",IDC_STATIC,269,24,125,105
+ GROUPBOX "When Minimized",IDC_STATIC,269,24,125,119
CTEXT "Run at priority:",IDC_MINIMIZED_PRI,278,36,109,10,SS_CENTERIMAGE | WS_TABSTOP
COMBOBOX IDC_MINIMIZED_PRIORITY,278,50,108,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Pause emulation",IDC_MINIMIZED_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,84,108,10
CONTROL "Disable sound",IDC_MINIMIZED_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,98,108,10
CONTROL "Disable game controllers",IDC_MINIMIZED_NOJOY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,112,107,10
- GROUPBOX "File Extension Associations",IDC_STATIC,0,137,260,155
- CONTROL "",IDC_ASSOCIATELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,9,154,238,108
- PUSHBUTTON "Associate all",IDC_ASSOCIATE_ON,36,270,85,14
- PUSHBUTTON "Deassociate all",IDC_ASSOCIATE_OFF,125,270,85,14
+ GROUPBOX "File Extension Associations",IDC_STATIC,0,148,260,155
+ CONTROL "",IDC_ASSOCIATELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,9,165,238,108
+ PUSHBUTTON "Associate all",IDC_ASSOCIATE_ON,36,281,85,14
+ PUSHBUTTON "Deassociate all",IDC_ASSOCIATE_OFF,125,281,85,14
+ CONTROL "Disable keyboard",IDC_ACTIVE_NOKEYBOARD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,126,109,10
+ CONTROL "Disable game controllers",IDC_ACTIVE_NOJOY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,112,109,10
END
IDD_DISK DIALOGEX 0, 0, 396, 316
setpaused(1);
sound_closed = 1;
} else if (currprefs.win32_iconified_nosound) {
- inputdevice_unacquire(true, currprefs.win32_iconified_input);
+ inputdevice_unacquire(currprefs.win32_iconified_input);
setsoundpaused();
sound_closed = -1;
} else {
- inputdevice_unacquire(true, currprefs.win32_iconified_input);
+ inputdevice_unacquire(currprefs.win32_iconified_input);
}
} else if (mouseactive) {
inputdevice_unacquire();
setpaused(2);
sound_closed = 1;
} else if (currprefs.win32_inactive_nosound) {
- inputdevice_unacquire(true, currprefs.win32_inactive_input);
+ inputdevice_unacquire(currprefs.win32_inactive_input);
setsoundpaused();
sound_closed = -1;
} else {
- inputdevice_unacquire(true, currprefs.win32_inactive_input);
+ inputdevice_unacquire(currprefs.win32_inactive_input);
}
}
} else {
p->win32_logfile = 0;
p->win32_active_nocapture_pause = 0;
p->win32_active_nocapture_nosound = 0;
+ p->win32_active_input = 1 | 2 | 4;
p->win32_iconified_nosound = 1;
p->win32_iconified_pause = 1;
p->win32_iconified_input = 0;
#endif
cfgfile_target_dwrite_bool(f, _T("active_not_captured_nosound"), p->win32_active_nocapture_nosound);
cfgfile_target_dwrite_bool(f, _T("active_not_captured_pause"), p->win32_active_nocapture_pause);
+ cfgfile_target_dwrite(f, _T("active_input"), _T("%d"), p->win32_active_input);
cfgfile_target_dwrite(f, _T("inactive_priority"), _T("%d"), priorities[p->win32_inactive_priority].value);
cfgfile_target_dwrite_bool(f, _T("inactive_nosound"), p->win32_inactive_nosound);
cfgfile_target_dwrite_bool(f, _T("inactive_pause"), p->win32_inactive_pause);
|| cfgfile_yesno(option, value, _T("active_not_captured_nosound"), &p->win32_active_nocapture_nosound)
|| cfgfile_yesno(option, value, _T("inactive_pause"), &p->win32_inactive_pause)
|| cfgfile_yesno(option, value, _T("inactive_nosound"), &p->win32_inactive_nosound)
+ || cfgfile_intval(option, value, _T("active_input"), &p->win32_active_input, 1)
|| cfgfile_intval(option, value, _T("inactive_input"), &p->win32_inactive_input, 1)
|| cfgfile_yesno(option, value, _T("iconified_pause"), &p->win32_iconified_pause)
|| cfgfile_yesno(option, value, _T("iconified_nosound"), &p->win32_iconified_nosound)
if (upd > 0) {
inputdevice_acquire(TRUE);
if (!isfocus())
- inputdevice_unacquire(true, input);
+ inputdevice_unacquire(input);
}
if (startpaused)
currprefs.win32_iconified_priority != changed_prefs.win32_iconified_priority ||
currprefs.win32_active_nocapture_nosound != changed_prefs.win32_active_nocapture_nosound ||
currprefs.win32_active_nocapture_pause != changed_prefs.win32_active_nocapture_pause ||
+ currprefs.win32_active_input != changed_prefs.win32_active_input ||
currprefs.win32_inactive_nosound != changed_prefs.win32_inactive_nosound ||
currprefs.win32_inactive_pause != changed_prefs.win32_inactive_pause ||
currprefs.win32_inactive_input != changed_prefs.win32_inactive_input ||
currprefs.win32_inactive_priority = changed_prefs.win32_inactive_priority;
currprefs.win32_iconified_priority = changed_prefs.win32_iconified_priority;
currprefs.win32_active_nocapture_nosound = changed_prefs.win32_active_nocapture_nosound;
+ currprefs.win32_active_input = changed_prefs.win32_active_input;
currprefs.win32_active_nocapture_pause = changed_prefs.win32_active_nocapture_pause;
currprefs.win32_inactive_nosound = changed_prefs.win32_inactive_nosound;
currprefs.win32_inactive_pause = changed_prefs.win32_inactive_pause;
bool paused = false;
bool nosound = false;
+ bool activenojoy = (workprefs.win32_active_input & 4) == 0;
+ bool activenokeyboard = (workprefs.win32_active_input & 1) == 0;
bool nojoy = (workprefs.win32_inactive_input & 4) == 0;
- ew (hDlg, IDC_ACTIVE_PAUSE, paused == false);
- ew (hDlg, IDC_ACTIVE_NOSOUND, nosound == false && paused == false);
+ ew(hDlg, IDC_ACTIVE_PAUSE, paused == false);
+ ew(hDlg, IDC_ACTIVE_NOSOUND, nosound == false && paused == false);
if (!paused) {
paused = workprefs.win32_active_nocapture_pause;
if (!nosound)
workprefs.win32_active_nocapture_pause = workprefs.win32_active_nocapture_nosound = true;
nosound = true;
nojoy = true;
+ workprefs.win32_active_input = 0;
}
+ ew(hDlg, IDC_ACTIVE_NOJOY, paused == false);
+ ew(hDlg, IDC_ACTIVE_NOKEYBOARD, paused == false);
if (paused)
CheckDlgButton (hDlg, IDC_INACTIVE_PAUSE, TRUE);
if (nosound || paused)
CheckDlgButton(hDlg, IDC_INACTIVE_NOSOUND, TRUE);
if (paused || nojoy)
CheckDlgButton(hDlg, IDC_INACTIVE_NOJOY, TRUE);
+ if (paused || activenojoy)
+ CheckDlgButton(hDlg, IDC_ACTIVE_NOJOY, TRUE);
+ if (paused || activenokeyboard)
+ CheckDlgButton(hDlg, IDC_ACTIVE_NOKEYBOARD, TRUE);
ew(hDlg, IDC_INACTIVE_PAUSE, paused == false);
ew(hDlg, IDC_INACTIVE_NOSOUND, nosound == false && paused == false);
ew(hDlg, IDC_INACTIVE_NOJOY, paused == false);
CheckDlgButton(hDlg, IDC_ACTIVE_PAUSE, workprefs.win32_active_nocapture_pause);
CheckDlgButton(hDlg, IDC_ACTIVE_NOSOUND, workprefs.win32_active_nocapture_nosound || workprefs.win32_active_nocapture_pause);
+ CheckDlgButton(hDlg, IDC_ACTIVE_NOJOY, (workprefs.win32_active_input & 4) == 0 || workprefs.win32_active_nocapture_pause);
+ CheckDlgButton(hDlg, IDC_ACTIVE_NOKEYBOARD, (workprefs.win32_active_input & 1) == 0 || workprefs.win32_active_nocapture_pause);
CheckDlgButton(hDlg, IDC_INACTIVE_PAUSE, workprefs.win32_inactive_pause);
CheckDlgButton(hDlg, IDC_INACTIVE_NOSOUND, workprefs.win32_inactive_nosound || workprefs.win32_inactive_pause);
CheckDlgButton(hDlg, IDC_INACTIVE_NOJOY, (workprefs.win32_inactive_input & 4) == 0 || workprefs.win32_inactive_pause);
workprefs.win32_inactive_input = ischecked(hDlg, IDC_INACTIVE_NOJOY) ? 0 : 4;
enable_for_miscdlg(hDlg);
break;
+ case IDC_ACTIVE_NOJOY:
+ if (!ischecked(hDlg, IDC_ACTIVE_NOJOY))
+ CheckDlgButton(hDlg, IDC_ACTIVE_NOJOY, BST_UNCHECKED);
+ case IDC_ACTIVE_NOKEYBOARD:
+ if (!ischecked(hDlg, IDC_ACTIVE_NOKEYBOARD))
+ CheckDlgButton(hDlg, IDC_ACTIVE_NOKEYBOARD, BST_UNCHECKED);
case IDC_ACTIVE_NOSOUND:
if (!ischecked (hDlg, IDC_ACTIVE_NOSOUND))
CheckDlgButton (hDlg, IDC_ACTIVE_PAUSE, BST_UNCHECKED);
if (workprefs.win32_active_nocapture_pause)
CheckDlgButton (hDlg, IDC_ACTIVE_NOSOUND, BST_CHECKED);
workprefs.win32_active_nocapture_nosound = ischecked (hDlg, IDC_ACTIVE_NOSOUND);
+ workprefs.win32_active_input = ischecked(hDlg, IDC_ACTIVE_NOJOY) ? 0 : 4;
+ workprefs.win32_active_input |= ischecked(hDlg, IDC_ACTIVE_NOKEYBOARD) ? 0 : 1;
enable_for_miscdlg (hDlg);
break;
case IDC_MINIMIZED_NOJOY: