From: Toni Wilen Date: Mon, 1 Oct 2012 17:42:22 +0000 (+0300) Subject: 2500b19 X-Git-Tag: 2500~12 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=4a5f18307f34e7882228834a962e87e002c5319b;p=francis%2Fwinuae.git 2500b19 --- diff --git a/blkdev.cpp b/blkdev.cpp index b3b433bd..c2f61a15 100644 --- a/blkdev.cpp +++ b/blkdev.cpp @@ -477,6 +477,13 @@ void blkdev_exitgui (void) } } +void check_prefs_changed_cd (void) +{ + if (!config_changed) + return; + currprefs.sound_volume_cd = changed_prefs.sound_volume_cd; +} + static void check_changes (int unitnum) { bool changed = false; diff --git a/cfgfile.cpp b/cfgfile.cpp index 49eb037d..7b534bb1 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -4453,7 +4453,7 @@ static void buildin_default_prefs (struct uae_prefs *p) p->cachesize = 0; p->socket_emu = 0; p->sound_volume = 0; - p->sound_volume_cd = -1; + p->sound_volume_cd = 0; p->clipboard_sharing = false; p->chipmem_size = 0x00080000; diff --git a/custom.cpp b/custom.cpp index 0d903dec..4f75cf61 100644 --- a/custom.cpp +++ b/custom.cpp @@ -2997,7 +2997,7 @@ void compute_framesync (void) } else { gfxvidinfo.drawbuffer.inwidth = AMIGA_WIDTH_MAX << currprefs.gfx_resolution; - gfxvidinfo.drawbuffer.extrawidth = 1; + gfxvidinfo.drawbuffer.extrawidth = 8; gfxvidinfo.drawbuffer.inwidth2 = gfxvidinfo.drawbuffer.inwidth; gfxvidinfo.drawbuffer.inheight = (maxvpos_nom - minfirstline + 1) << currprefs.gfx_vresolution; gfxvidinfo.drawbuffer.inheight2 = gfxvidinfo.drawbuffer.inheight; diff --git a/drawing.cpp b/drawing.cpp index ffb2c583..5c96254c 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2340,7 +2340,7 @@ static void center_image (void) } } else if (gfxvidinfo.drawbuffer.extrawidth) { visible_left_border = max_diwlastword - w; - //visible_left_border += gfxvidinfo.drawbuffer.extrawidth << currprefs.gfx_resolution; + visible_left_border += gfxvidinfo.drawbuffer.extrawidth << currprefs.gfx_resolution; } else { if (gfxvidinfo.drawbuffer.inxoffset < 0) { visible_left_border = 0; @@ -2854,6 +2854,7 @@ void vsync_handle_check (void) notice_new_xcolors (); } check_prefs_changed_audio (); + check_prefs_changed_cd (); check_prefs_changed_custom (); check_prefs_changed_cpu (); } diff --git a/filesys.cpp b/filesys.cpp index 77414b54..7dfcdf52 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -2656,6 +2656,7 @@ static void put_long (info + 4, nr); /* unit number */ put_long (info + 8, unit->ui.readonly || unit->ui.locked ? 80 : 82); /* state */ put_long (info + 20, blocksize); /* bytesperblock */ + put_long (info + 32, 0); /* inuse */ if (disk_info && unit->ui.unknown_media) { put_long (info + 12, 0); put_long (info + 16, 0); @@ -2678,8 +2679,8 @@ static void put_long (info + 16, fsu.fsu_blocks - fsu.fsu_bavail); /* inuse */ put_long (info + 24, dostype); /* disk type */ put_long (info + 28, unit->volume >> 2); /* volume node */ + put_long (info + 32, (get_long (unit->volume + 28) || unit->keys) ? -1 : 0); /* inuse */ } - put_long (info + 32, 0); /* inuse */ PUT_PCK_RES1 (packet, DOS_TRUE); } diff --git a/hardfile.cpp b/hardfile.cpp index 4fc6e6a5..6199a965 100644 --- a/hardfile.cpp +++ b/hardfile.cpp @@ -1867,6 +1867,8 @@ static int hardfile_can_quick (uae_u32 command) { switch (command) { + case CMD_REMCHANGEINT: + return -1; case CMD_RESET: case CMD_STOP: case CMD_START: @@ -1874,8 +1876,8 @@ static int hardfile_can_quick (uae_u32 command) case CMD_PROTSTATUS: case CMD_MOTOR: case CMD_GETDRIVETYPE: - case CMD_GETNUMTRACKS: case CMD_GETGEOMETRY: + case CMD_GETNUMTRACKS: case NSCMD_DEVICEQUERY: return 1; } @@ -1896,6 +1898,7 @@ static uae_u32 REGPARAM2 hardfile_beginio (TrapContext *context) int unit = mangleunit (get_long (request + 24)); struct hardfiledata *hfd = get_hardfile_data (unit); struct hardfileprivdata *hfpd = &hardfpd[unit]; + int canquick; put_byte (request + 8, NT_MESSAGE); start_thread (context, unit); @@ -1904,10 +1907,13 @@ static uae_u32 REGPARAM2 hardfile_beginio (TrapContext *context) return get_byte (request + 31); } put_byte (request + 31, 0); - if ((flags & 1) && hardfile_canquick (hfd, request)) { + canquick = hardfile_canquick (hfd, request); + if (((flags & 1) && canquick) || (canquick < 0)) { hf_log (_T("hf quickio unit=%d request=%p cmd=%d\n"), unit, request, cmd); if (hardfile_do_io (hfd, hfpd, request)) hf_log2 (_T("uaehf.device cmd %d bug with IO_QUICK\n"), cmd); + if (!(flags & 1)) + uae_ReplyMsg (request); return get_byte (request + 31); } else { hf_log2 (_T("hf asyncio unit=%d request=%p cmd=%d\n"), unit, request, cmd); diff --git a/include/options.h b/include/options.h index eabe1307..80086c82 100644 --- a/include/options.h +++ b/include/options.h @@ -588,6 +588,7 @@ extern void fixup_cpu (struct uae_prefs *prefs); extern void check_prefs_changed_custom (void); extern void check_prefs_changed_cpu (void); extern void check_prefs_changed_audio (void); +extern void check_prefs_changed_cd (void); extern int check_prefs_changed_gfx (void); extern struct uae_prefs currprefs, changed_prefs; diff --git a/od-win32/blkdev_win32_ioctl.cpp b/od-win32/blkdev_win32_ioctl.cpp index 67369808..f2cb26e8 100644 --- a/od-win32/blkdev_win32_ioctl.cpp +++ b/od-win32/blkdev_win32_ioctl.cpp @@ -56,7 +56,6 @@ struct dev_info_ioctl { int cdda_paused; int cdda_volume[2]; int cdda_scan; - int cdda_volume_main; int cd_last_pos; HWAVEOUT cdda_wavehandle; int cdda_start, cdda_end; @@ -1202,7 +1201,6 @@ static int sys_cddev_open (struct dev_info_ioctl *ciw, int unitnum) ciw->cdda_volume[0] = 0x7fff; ciw->cdda_volume[1] = 0x7fff; - ciw->cdda_volume_main = currprefs.sound_volume_cd >= 0 ? currprefs.sound_volume_cd : currprefs.sound_volume; /* buffer must be page aligned for device access */ ciw->tempbuffer = (uae_u8*)VirtualAlloc (NULL, IOCTL_DATA_BUFFER, MEM_COMMIT, PAGE_READWRITE); if (!ciw->tempbuffer) { diff --git a/od-win32/dinput.cpp b/od-win32/dinput.cpp index 54d0c432..66c3a64b 100644 --- a/od-win32/dinput.cpp +++ b/od-win32/dinput.cpp @@ -3779,8 +3779,10 @@ int input_get_default_joystick (struct uae_input_device *uid, int i, int port, i setid (uid, i, ID_BUTTON_OFFSET + 0, 0, port, port ? INPUTEVENT_JOY2_FIRE_BUTTON : INPUTEVENT_JOY1_FIRE_BUTTON, af, gp); if (isrealbutton (did, 1)) setid (uid, i, ID_BUTTON_OFFSET + 1, 0, port, port ? INPUTEVENT_JOY2_2ND_BUTTON : INPUTEVENT_JOY1_2ND_BUTTON, gp); - if (isrealbutton (did, 2)) - setid (uid, i, ID_BUTTON_OFFSET + 2, 0, port, port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON, gp); + if (mode != JSEM_MODE_JOYSTICK) { + if (isrealbutton (did, 2)) + setid (uid, i, ID_BUTTON_OFFSET + 2, 0, port, port ? INPUTEVENT_JOY2_3RD_BUTTON : INPUTEVENT_JOY1_3RD_BUTTON, gp); + } } for (j = 2; j < MAX_MAPPINGS - 1; j++) { diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index 842b20a4..218c6d5f 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -2061,6 +2061,7 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int depth, int mmult) LPDIRECT3DCREATE9EX d3dexp = NULL; int vsync = isvsync (); struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[APMODE_RTG] : &currprefs.gfx_apmode[APMODE_NATIVE]; + D3DADAPTER_IDENTIFIER9 did; D3D_free2 (); if (!currprefs.gfx_api) { @@ -2129,6 +2130,11 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int depth, int mmult) write_log (_T("%s: GetAdapterDisplayMode failed %s\n"), D3DHEAD, D3D_ErrorString (hr)); if (FAILED (hr = d3d->GetDeviceCaps (adapter, D3DDEVTYPE_HAL, &d3dCaps))) write_log (_T("%s: GetDeviceCaps failed %s\n"), D3DHEAD, D3D_ErrorString (hr)); + if (SUCCEEDED (hr = d3d->GetAdapterIdentifier (adapter, 0, &did))) { + TCHAR *s = au (did.Description); + write_log (_T("Device name: '%s' %llx.%x\n"), s, did.DriverVersion, did.Revision); + xfree (s); + } memset (&dpp, 0, sizeof (dpp)); dpp.Windowed = isfullscreen () <= 0; diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 273d87b6..148ea3c2 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -716,6 +716,7 @@ #define IDC_SOUNDBUFFERMEM 1577 #define IDC_HARDFLUSH 1578 #define IDC_SOUNDADJUSTNUM 1578 +#define IDC_SOUNDVOLUMECD 1578 #define IDC_CONSTJUMP 1579 #define IDC_SOUNDDRIVEVOLUME 1579 #define IDC_JITFPU 1580 @@ -723,6 +724,8 @@ #define IDC_NOFLAGS 1581 #define IDC_SOUNDDRIVEVOLUME2 1581 #define IDC_CS_CACHE_TEXT 1582 +#define IDC_SOUNDVOLUME3 1582 +#define IDC_SOUNDVOLUMECD2 1582 #define IDC_CS_CACHE_TEXT2 1583 #define IDC_COLLISIONS 1584 #define IDC_JITENABLE 1584 @@ -1090,6 +1093,7 @@ #define IDC_PORT3_REMAP 1801 #define IDC_INPUTMAPOUT 1801 #define IDC_INFOBOX_TEXT2 1802 +#define IDC_INPUTMAPOUTM 1802 #define IDC_INFOBOX_TEXT1 1803 #define IDC_INFOBOX_TEXT3 1804 #define IDC_CD_EJECT 1804 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index fd93b270..939d2314 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -325,42 +325,46 @@ STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN COMBOBOX IDC_SOUNDCARDLIST,1,1,393,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,1,19,178,86 - CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,35,152,10 - CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,53,152,10 - CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,71,152,10 - CONTROL "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,89,152,10 - GROUPBOX "Volume",IDC_STATIC,185,19,209,41 + GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,1,19,132,112 + CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,35,108,10 + CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,53,107,10 + CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,71,108,10 + CONTROL "Automatic switching",IDC_SOUND_AUTO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,89,108,10 + GROUPBOX "Volume",IDC_STATIC,139,19,255,69 CONTROL "",IDC_SOUNDVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,207,32,105,20 - EDITTEXT IDC_SOUNDVOLUME2,323,35,48,12,ES_CENTER | ES_READONLY - GROUPBOX "Sound Buffer Size",IDC_STATIC,185,63,209,41 - CONTROL "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,207,79,105,20 - EDITTEXT IDC_SOUNDBUFFERMEM,323,82,48,12,ES_CENTER | ES_READONLY - GROUPBOX "Settings",IDC_SOUNDINTERPOLATION2,1,107,393,72 - LTEXT "Channel mode:",IDC_SOUNDSTEREOTXT,22,119,128,8,SS_CENTERIMAGE - COMBOBOX IDC_SOUNDSTEREO,24,129,135,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Stereo separation:",IDC_SOUNDSTEREOSEPTXT,180,119,84,8,SS_CENTERIMAGE - COMBOBOX IDC_SOUNDSTEREOSEP,181,129,74,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,279,119,98,8,SS_CENTERIMAGE - COMBOBOX IDC_SOUNDINTERPOLATION,279,129,96,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Frequency:",IDC_SOUNDFREQTXT,22,147,58,8,SS_CENTERIMAGE - COMBOBOX IDC_SOUNDFREQ,24,157,55,75,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - LTEXT "Swap channels:",IDC_SOUNDSWAPTXT,85,147,81,8,SS_CENTERIMAGE - COMBOBOX IDC_SOUNDSWAP,86,157,74,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Stereo delay:",IDC_SOUNDSTEREOMIXTXT,180,147,83,8,SS_CENTERIMAGE - COMBOBOX IDC_SOUNDSTEREOMIX,181,157,74,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Audio filter:",IDC_SOUNDFILTERTXT,279,147,98,8,SS_CENTERIMAGE - COMBOBOX IDC_SOUNDFILTER,279,157,96,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Floppy Drive Sound Emulation",IDC_STATIC,1,185,278,73 - CONTROL "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,20,201,107,19 - EDITTEXT IDC_SOUNDDRIVEVOLUME2,144,203,48,12,ES_CENTER | ES_READONLY - COMBOBOX IDC_SOUNDDRIVE,205,203,66,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_SOUNDDRIVESELECT,18,229,253,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Drivers",IDC_STATIC,285,185,109,73 - CONTROL "DirectSound",IDC_SOUND_DS,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,199,98,10 - CONTROL "WASAPI",IDC_SOUND_WASAPI,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,212,98,10 - CONTROL "OpenAL",IDC_SOUND_OPENAL,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,225,98,10 - CONTROL "PortAudio",IDC_SOUND_PORTAUDIO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,238,98,10 + EDITTEXT IDC_SOUNDVOLUME2,329,35,48,12,ES_CENTER | ES_READONLY + GROUPBOX "Sound Buffer Size",IDC_STATIC,140,90,254,42 + CONTROL "Slider1",IDC_SOUNDBUFFERRAM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,207,106,105,20 + EDITTEXT IDC_SOUNDBUFFERMEM,329,109,48,12,ES_CENTER | ES_READONLY + GROUPBOX "Settings",IDC_SOUNDINTERPOLATION2,1,136,393,72 + LTEXT "Channel mode:",IDC_SOUNDSTEREOTXT,22,148,128,8,SS_CENTERIMAGE + COMBOBOX IDC_SOUNDSTEREO,24,158,135,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Stereo separation:",IDC_SOUNDSTEREOSEPTXT,180,148,84,8,SS_CENTERIMAGE + COMBOBOX IDC_SOUNDSTEREOSEP,181,158,74,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Interpolation:",IDC_SOUNDINTERPOLATIONTXT,279,148,98,8,SS_CENTERIMAGE + COMBOBOX IDC_SOUNDINTERPOLATION,279,158,96,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Frequency:",IDC_SOUNDFREQTXT,22,176,58,8,SS_CENTERIMAGE + COMBOBOX IDC_SOUNDFREQ,24,186,55,75,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + LTEXT "Swap channels:",IDC_SOUNDSWAPTXT,85,176,81,8,SS_CENTERIMAGE + COMBOBOX IDC_SOUNDSWAP,86,186,74,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Stereo delay:",IDC_SOUNDSTEREOMIXTXT,180,176,83,8,SS_CENTERIMAGE + COMBOBOX IDC_SOUNDSTEREOMIX,181,186,74,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Audio filter:",IDC_SOUNDFILTERTXT,279,176,98,8,SS_CENTERIMAGE + COMBOBOX IDC_SOUNDFILTER,279,186,96,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Floppy Drive Sound Emulation",IDC_STATIC,1,213,278,73 + CONTROL "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,20,229,107,19 + EDITTEXT IDC_SOUNDDRIVEVOLUME2,144,231,48,12,ES_CENTER | ES_READONLY + COMBOBOX IDC_SOUNDDRIVE,205,231,66,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SOUNDDRIVESELECT,18,257,253,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Drivers",IDC_STATIC,285,213,109,73 + CONTROL "DirectSound",IDC_SOUND_DS,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,227,98,10 + CONTROL "WASAPI",IDC_SOUND_WASAPI,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,240,98,10 + CONTROL "OpenAL",IDC_SOUND_OPENAL,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,253,98,10 + CONTROL "PortAudio",IDC_SOUND_PORTAUDIO,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,266,98,10 + CONTROL "",IDC_SOUNDVOLUMECD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,207,61,105,20 + EDITTEXT IDC_SOUNDVOLUMECD2,329,64,48,12,ES_CENTER | ES_READONLY + RTEXT "CD Audio",IDC_STATIC,152,67,51,10,SS_CENTERIMAGE + RTEXT "Paula Audio",IDC_STATIC,152,38,51,10,SS_CENTERIMAGE END IDD_LOADSAVE DIALOGEX 0, 0, 396, 318 @@ -1066,8 +1070,9 @@ IDD_INPUTMAP DIALOGEX 0, 0, 396, 318 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN - CONTROL "",IDC_INPUTMAPLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,1,393,298 - EDITTEXT IDC_INPUTMAPOUT,1,304,393,14,ES_AUTOHSCROLL | WS_DISABLED + CONTROL "",IDC_INPUTMAPLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,1,393,268 + EDITTEXT IDC_INPUTMAPOUT,1,272,393,14,ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED + EDITTEXT IDC_INPUTMAPOUTM,1,288,393,29,ES_MULTILINE | ES_READONLY | WS_DISABLED END IDD_INFOBOX DIALOGEX 0, 0, 420, 68 diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index fe4a2bf6..c4f9e170 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -871,6 +871,7 @@ static LRESULT CALLBACK RPHostMsgFunction2 (UINT uMessage, WPARAM wParam, LPARAM return 1; case RP_IPC_TO_GUEST_VOLUME: currprefs.sound_volume = changed_prefs.sound_volume = 100 - wParam; + currprefs.sound_volume_cd = changed_prefs.sound_volume_cd = 100 - wParam; set_volume (currprefs.sound_volume, 0); return TRUE; case RP_IPC_TO_GUEST_ESCAPEKEY: diff --git a/od-win32/sounddep/sound.cpp b/od-win32/sounddep/sound.cpp index a06cfcd2..f2a8dee6 100644 --- a/od-win32/sounddep/sound.cpp +++ b/od-win32/sounddep/sound.cpp @@ -2782,11 +2782,17 @@ void sound_mute (int newmute) void sound_volume (int dir) { currprefs.sound_volume -= dir * 10; + currprefs.sound_volume_cd -= dir * 10; if (currprefs.sound_volume < 0) currprefs.sound_volume = 0; if (currprefs.sound_volume > 100) currprefs.sound_volume = 100; changed_prefs.sound_volume = currprefs.sound_volume; + if (currprefs.sound_volume_cd < 0) + currprefs.sound_volume_cd = 0; + if (currprefs.sound_volume_cd > 100) + currprefs.sound_volume_cd = 100; + changed_prefs.sound_volume_cd = currprefs.sound_volume_cd; set_volume (currprefs.sound_volume, sdp->mute); config_changed = 1; } diff --git a/od-win32/win32.h b/od-win32/win32.h index ad1a01ea..670ad19b 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -19,8 +19,8 @@ #define LANG_DLL 1 //#define WINUAEBETA _T("") -#define WINUAEBETA _T("18") -#define WINUAEDATE MAKEBD(2012, 9, 23) +#define WINUAEBETA _T("19") +#define WINUAEDATE MAKEBD(2012, 10, 1) #define WINUAEEXTRA _T("") //#define WINUAEEXTRA _T("AmiKit Preview") #define WINUAEREV _T("") diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 9488271e..f3402525 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -686,6 +686,47 @@ static BOOL CALLBACK monitorEnumProc (HMONITOR h, HDC hdc, LPRECT rect, LPARAM d return TRUE; } +static void getd3dmonitornames (void) +{ + struct MultiDisplay *md = Displays; + IDirect3D9 *d3d; + int max; + + // XP does not support hybrid displays, don't load Direct3D + if (!os_vista) + return; + d3d = Direct3DCreate9 (D3D_SDK_VERSION); + if (!d3d) + return; + max = d3d->GetAdapterCount (); + while (md - Displays < MAX_DISPLAYS && md->monitorid) { + POINT pt; + HMONITOR winmon; + pt.x = (md->rect.right - md->rect.left) / 2 + md->rect.left; + pt.y = (md->rect.bottom - md->rect.top) / 2 + md->rect.top; + winmon = MonitorFromPoint (pt, MONITOR_DEFAULTTONEAREST); + for (int i = 0; i < max; i++) { + D3DADAPTER_IDENTIFIER9 did; + HMONITOR d3dmon = d3d->GetAdapterMonitor (i); + if (d3dmon != winmon) + continue; + if (SUCCEEDED (d3d->GetAdapterIdentifier (i, 0, &did))) { + TCHAR *name = au (did.Description); + if (_tcsicmp (name, md->adaptername)) { + write_log (_T("%d: '%s' -> '%s'\n"), i, md->adaptername, name); + xfree (md->adaptername); + md->adaptername = name; + name = NULL; + } + xfree (name); + } + break; + } + md++; + } + d3d->Release (); +} + void enumeratedisplays (void) { struct MultiDisplay *md = Displays; @@ -734,6 +775,7 @@ void enumeratedisplays (void) } } EnumDisplayMonitors (NULL, NULL, monitorEnumProc, NULL); + getd3dmonitornames (); //sortmonitors (); } diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 75e33db4..d1fc139b 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -8590,6 +8590,8 @@ static void enable_for_sounddlg (HWND hDlg) ew (hDlg, IDC_SOUNDINTERPOLATION, workprefs.produce_sound); ew (hDlg, IDC_SOUNDVOLUME, workprefs.produce_sound); ew (hDlg, IDC_SOUNDVOLUME2, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDVOLUMECD, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDVOLUMECD2, workprefs.produce_sound); ew (hDlg, IDC_SOUNDSTEREOSEP, workprefs.sound_stereo > 0 && workprefs.produce_sound); ew (hDlg, IDC_SOUNDSTEREOMIX, workprefs.sound_stereo > 0 && workprefs.produce_sound); @@ -8687,6 +8689,10 @@ static void update_soundgui (HWND hDlg) _stprintf (txt, _T("%d%%"), 100 - workprefs.sound_volume); SetDlgItemText (hDlg, IDC_SOUNDVOLUME2, txt); + SendDlgItemMessage (hDlg, IDC_SOUNDVOLUMECD, TBM_SETPOS, TRUE, 100 - workprefs.sound_volume_cd); + _stprintf (txt, _T("%d%%"), 100 - workprefs.sound_volume_cd); + SetDlgItemText (hDlg, IDC_SOUNDVOLUMECD2, txt); + SendDlgItemMessage (hDlg, IDC_SOUNDDRIVEVOLUME, TBM_SETPOS, TRUE, 100 - workprefs.dfxclickvolume); _stprintf (txt, _T("%d%%"), 100 - workprefs.dfxclickvolume); SetDlgItemText (hDlg, IDC_SOUNDDRIVEVOLUME2, txt); @@ -8808,6 +8814,7 @@ static void values_to_sounddlg (HWND hDlg) SendDlgItemMessage (hDlg, IDC_SOUNDBUFFERRAM, TBM_SETPOS, TRUE, getsoundbufsizeindex (workprefs.sound_maxbsiz)); SendDlgItemMessage (hDlg, IDC_SOUNDVOLUME, TBM_SETPOS, TRUE, 0); + SendDlgItemMessage (hDlg, IDC_SOUNDVOLUMECD, TBM_SETPOS, TRUE, 0); SendDlgItemMessage (hDlg, IDC_SOUNDDRIVEVOLUME, TBM_SETPOS, TRUE, 0); SendDlgItemMessage (hDlg, IDC_SOUNDCARDLIST, CB_SETCURSEL, workprefs.win32_soundcard, 0); @@ -8980,6 +8987,9 @@ static INT_PTR CALLBACK SoundDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM SendDlgItemMessage (hDlg, IDC_SOUNDVOLUME, TBM_SETRANGE, TRUE, MAKELONG (0, 100)); SendDlgItemMessage (hDlg, IDC_SOUNDVOLUME, TBM_SETPAGESIZE, 0, 1); + SendDlgItemMessage (hDlg, IDC_SOUNDVOLUMECD, TBM_SETRANGE, TRUE, MAKELONG (0, 100)); + SendDlgItemMessage (hDlg, IDC_SOUNDVOLUMECD, TBM_SETPAGESIZE, 0, 1); + SendDlgItemMessage (hDlg, IDC_SOUNDDRIVEVOLUME, TBM_SETRANGE, TRUE, MAKELONG (0, 100)); SendDlgItemMessage (hDlg, IDC_SOUNDDRIVEVOLUME, TBM_SETPAGESIZE, 0, 1); @@ -9034,6 +9044,7 @@ static INT_PTR CALLBACK SoundDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM workprefs.sound_maxbsiz = sndbufsizes[v]; } workprefs.sound_volume = 100 - SendMessage (GetDlgItem (hDlg, IDC_SOUNDVOLUME), TBM_GETPOS, 0, 0); + workprefs.sound_volume_cd = 100 - SendMessage (GetDlgItem (hDlg, IDC_SOUNDVOLUMECD), TBM_GETPOS, 0, 0); workprefs.dfxclickvolume = 100 - SendMessage (GetDlgItem (hDlg, IDC_SOUNDDRIVEVOLUME), TBM_GETPOS, 0, 0); update_soundgui (hDlg); break; @@ -12149,6 +12160,55 @@ static void input_swap (HWND hDlg) init_inputdlg (hDlg); } +static void showextramap (HWND hDlg) +{ + int evt; + uae_u64 flags; + TCHAR name[256]; + TCHAR custom[MAX_DPATH]; + TCHAR out[MAX_DPATH], out2[100]; + + out[0] = 0; + for (int i = 0; i < MAX_INPUT_SUB_EVENT; i++) { + evt = inputdevice_get_mapping (input_selected_device, input_selected_widget, + &flags, NULL, name, custom, i); + if (evt <= 0 && !custom[0]) + continue; + if (out[0]) + _tcscat (out, _T(" ; ")); + if (evt > 0) { + _tcscat (out, name); + if (flags & IDEV_MAPPED_AUTOFIRE_SET) + _tcscat (out, _T(" (AF)")); + if (flags & IDEV_MAPPED_TOGGLE) + _tcscat (out, _T(" (T)")); + if (flags & IDEV_MAPPED_INVERTTOGGLE) + _tcscat (out, _T(" (IT)")); + if (flags & IDEV_MAPPED_QUALIFIER_MASK) { + bool gotone = false; + _tcscat (out, _T(" Q(")); + for (int j = 0; j < MAX_INPUT_QUALIFIERS * 2; j++) { + uae_u64 mask = IDEV_MAPPED_QUALIFIER1 << j; + if (mask & flags) { + if (gotone) + _tcscat (out, _T(",")); + gotone = true; + getqualifiername (out2, mask); + _tcscat (out, out2); + } + } + _tcscat (out, _T(")")); + } + } + if (custom[0]) { + _tcscat (out, _T("[")); + _tcscat (out, custom); + _tcscat (out, _T("]")); + } + } + SetWindowText (GetDlgItem (hDlg, IDC_INPUTMAPOUTM), out); +} + static void input_find (HWND hDlg, int mode, int set); static int rawmode; static int inputmap_remap_counter, inputmap_view_offset; @@ -12304,6 +12364,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw _tcscat (tmp, _T(", ")); _tcscat (tmp, inputdevice_get_device_name2 (input_selected_device)); SetWindowText (GetDlgItem (hDlg, IDC_INPUTMAPOUT), tmp); + showextramap (hDlg); } else { // input panel diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index ba2d27d3..db8baac9 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,10 +1,23 @@ -- Use dos.library version to detect between 1.x and 2.x+ . CDTV KS 1.3 + 2.x extended ROM = v37 exec. +- Merged SVN updates. +- Check dos.library's version, not exec's, to detect KS version. Exec version is v37 on CDTV with KS 1.3 + 2.x extended ROM. - Enabled removable media support. -- Merged new offical SVN updates. +- Fixed ACTION_DIE (unmount) crash. +- 1.x C:Info does not anymore report no disk state. - restore only single input target to default. +Beta 19: + +- GamePorts panel Test function now shows all currently mapped input target(s). Can be used to test any kind of input event mapping. +- Do not map 3rd button to joystick/pad with more than 2 buttons if GamePorts panel gameport mode is joystick. + Joystick is meant to be max 2-button, non-pullup resistor game controller. +- Directory filesystem ACTION_DISK_INFO InfoData->id_Inuse is now non-zero if any files or locks are open. (Was previously always zero) +- Use D3D (if available) to fetch GPU names listed in monitor selection GUI. Should now show correct GPU name when running on hybrid GPU systems. +- GUI CD audio volume control added. +- Standard PAL/NTSC mode horizontal position (without filters or centering enabled) is not slightly shifted anymore, not sure when this + changed, probably in some update that improved programmed mode display positioning. + Beta 18: - FPS and CPU% react quicker now. Can Show previously hidden CPU usage spikes. NOTE: CPU% now showing "myserious" usage spikes does not mean emulation has become slower! @@ -19,7 +32,7 @@ Beta 18: - Improved 68030 MMU instruction decoding. WHDLoad + MMU option enabled + 68030 CPU does not crash anymore. (No, there still is no 68030 MMU emulation, it is only emulating 68EC030 without MMU circuitry which probably does not exist in real world + hack for A3000 1.4 ROM) - Few (rare) variants of MOVES didn't increase PC correctly. -- BSR.L was emulated as 68020+ instruction on 68000/010. (BCC.L was correct) +- BSR.L was emulated as 68020+ instruction on 68000/010. (Bcc.L was correct) - For some reason 68000 BSR.B and BSR.W address exception stack frame PC field points to new odd PC, instead of address of BSR opcode. Beta 17: diff --git a/scsiemul.cpp b/scsiemul.cpp index 23f07b22..864e11a3 100644 --- a/scsiemul.cpp +++ b/scsiemul.cpp @@ -939,6 +939,8 @@ static uae_u32 REGPARAM2 dev_beginio (TrapContext *context) canquick = dev_canquick (dev, request); if (((flags & 1) && canquick) || (canquick < 0)) { dev_do_io (dev, request); + if (!(flags & 1)) + uae_ReplyMsg (request); return get_byte (request + 31); } else { add_async_request (dev, request, ASYNC_REQUEST_TEMP, 0);