From: Toni Wilen Date: Mon, 10 Sep 2012 16:08:51 +0000 (+0300) Subject: 2500b17 X-Git-Tag: 2500~14 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=d3718565f7e4070bf7174a96ae6238d8e78e35a4;p=francis%2Fwinuae.git 2500b17 --- diff --git a/cfgfile.cpp b/cfgfile.cpp index 3e2dcbd4..ef171a91 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -5120,7 +5120,7 @@ void config_check_vsync (void) // if (config_changed == 1) // write_log (_T("* configuration check trigger\n")); config_changed++; - if (config_changed > 10) + if (config_changed >= 3) config_changed = 0; } } diff --git a/filesys.cpp b/filesys.cpp index 6924c2b7..77414b54 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -677,13 +677,12 @@ static void allocuci (struct uae_prefs *p, int nr, int idx) static void initialize_mountinfo (void) { int nr; - struct uaedev_config_info *uci; UnitInfo *uip = &mountinfo.ui[0]; cd_unit_offset = MAX_FILESYSTEM_UNITS; for (nr = 0; nr < currprefs.mountitems; nr++) { - uci = &currprefs.mountconfig[nr]; + struct uaedev_config_info *uci = &currprefs.mountconfig[nr]; if (uci->controller == HD_CONTROLLER_UAE) { int idx = set_filesys_unit_1 (-1, uci->devname, uci->ishdf ? NULL : uci->volname, uci->rootdir, uci->readonly, uci->sectors, uci->surfaces, uci->reserved, @@ -712,6 +711,7 @@ static void initialize_mountinfo (void) #endif for (nr = 0; nr < currprefs.mountitems; nr++) { + struct uaedev_config_info *uci = &currprefs.mountconfig[nr]; if (uci->controller == HD_CONTROLLER_UAE) continue; if (uci->controller <= HD_CONTROLLER_IDE3) { diff --git a/main.cpp b/main.cpp index 9f4839c7..c4a8e4ee 100644 --- a/main.cpp +++ b/main.cpp @@ -570,7 +570,19 @@ static void parse_cmdline_2 (int argc, TCHAR **argv) } } -static void parse_diskswapper (TCHAR *s) +static int diskswapper_cb (struct zfile *f, void *vrsd) +{ + int *num = (int*)vrsd; + if (*num >= MAX_SPARE_DRIVES) + return 1; + if (zfile_gettype (f) == ZFILE_DISKIMAGE) { + _tcsncpy (currprefs.dfxlist[*num], zfile_getname (f), 255); + (*num)++; + } + return 0; +} + +static void parse_diskswapper (const TCHAR *s) { TCHAR *tmp = my_strdup (s); TCHAR *delim = _T(","); @@ -585,8 +597,10 @@ static void parse_diskswapper (TCHAR *s) p1 = NULL; if (num >= MAX_SPARE_DRIVES) break; - _tcsncpy (currprefs.dfxlist[num], p2, 255); - num++; + if (!zfile_zopen (p2, diskswapper_cb, &num)) { + _tcsncpy (currprefs.dfxlist[num], p2, 255); + num++; + } } free (tmp); } diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index 97b5ec96..a1f484f9 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -1625,7 +1625,7 @@ static void setupscenecoords (void) fakesize.w = 1; fakesize.z = 1; - MatrixOrthoOffCenterLH (&m_matProj, 0, w, 0, h, 0.0f, 1.0f); + MatrixOrthoOffCenterLH (&m_matProj, 0, w + 0.05f, 0, h + 0.05f, 0.0f, 1.0f); float tx, ty; float sw, sh; @@ -1665,8 +1665,8 @@ static void setupscenecoords (void) sw = dw * tin_w / window_w; sh = dh * tin_h / window_h; - sw -= 0.5f; - sh += 0.5f; + //sw -= 0.5f; + //sh += 0.5f; tx += xshift; ty += yshift; @@ -1675,7 +1675,7 @@ static void setupscenecoords (void) MatrixTranslation (&m_matView, tx, ty, 1.0f); - MatrixScaling (&m_matWorld, sw, sh, 1.0f); + MatrixScaling (&m_matWorld, sw + 0.5f / sw, sh + 0.5f / sh, 1.0f); cursor_offset_x = -zr.left; cursor_offset_y = -zr.top; @@ -1686,8 +1686,8 @@ static void setupscenecoords (void) float sw2 = dw * tin_w / window_w; float sh2 = dh * tin_h / window_h; - sw2 -= 0.5f; - sh2 += 0.5f; + //sw2 -= 0.5f; + //sh2 += 0.5f; maskmult.x = sw2 * maskmult_x / w; maskmult.y = sh2 * maskmult_y / h; diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 483e9035..f0d8db9b 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -599,45 +599,45 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,201,57,48,15 END -IDD_CHIPSET DIALOGEX 0, 0, 302, 172 +IDD_CHIPSET DIALOGEX 0, 0, 396, 169 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - GROUPBOX "Chipset",IDC_STATIC,1,0,160,111 + GROUPBOX "Chipset",IDC_STATIC,1,0,212,111 CONTROL "OCS [] Original chipset. A1000 and most A500s.",IDC_OCS, - "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,9,15,73,10 + "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,15,88,10 CONTROL "ECS Agnus [] Enhanced chipset (ECS Agnus chip only). CDTV and later A500 and A2000 hardware revisions.",IDC_ECS_AGNUS, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,9,31,73,10 + "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,31,88,10 CONTROL "Full ECS [] Full ECS chipset (ECS Agnus and ECS Denise chips). A500+, A600 and A3000.",IDC_ECS, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,9,47,73,10 + "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,14,47,88,10 CONTROL "AGA [] Advanced Graphics Architecture chipset. A1200, A4000 and CD32.",IDC_AGA, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,86,15,72,10 + "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,114,15,86,10 CONTROL "ECS Denise [] Enhanced chipset (ECS Denise chip only). Normally paired with ECS Agnus.",IDC_ECS_DENISE, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,86,31,72,10 + "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,114,31,86,10 CONTROL "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,86,47,72,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,47,86,10 CONTROL "Cycle-exact [] The most compatible A500/A1200 emulation mode. Very fast PC recommended.",IDC_CYCLEEXACT, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,69,139,10 - RTEXT "Chipset Extra",IDC_STATIC,11,89,71,15,SS_CENTERIMAGE - COMBOBOX IDC_CS_EXT,86,90,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Options",IDC_STATIC,167,0,133,111 + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,25,69,170,10 + RTEXT "Chipset Extra",IDC_STATIC,30,89,71,15,SS_CENTERIMAGE + COMBOBOX IDC_CS_EXT,105,90,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Options",IDC_STATIC,221,0,173,111 CONTROL "Immediate Blitter [] Faster but less compatible blitter emulation.",IDC_BLITIMM, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,16,116,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,16,150,10 CONTROL "Wait for Blitter [] Compatibility hack for programs that don't wait for the blitter correctly, causing graphics corruption if CPU is too fast.",IDC_BLITWAIT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,180,29,116,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,29,150,10 CONTROL "Genlock connected [] Allow boot sequence to detect genlock. Genlock is not emulated.",IDC_GENLOCK, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,180,42,116,10 - CTEXT "External display hardware:",IDC_STATIC,174,59,117,15,SS_CENTERIMAGE - COMBOBOX IDC_MONITOREMU,184,78,98,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Collision Level",IDC_STATIC,1,116,299,48 + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,234,42,150,10 + CTEXT "External display hardware:",IDC_STATIC,228,59,117,15,SS_CENTERIMAGE + COMBOBOX IDC_MONITOREMU,238,78,98,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Collision Level",IDC_STATIC,1,116,393,48 CONTROL "None [] Collision hardware emulation disabled.",IDC_COLLISION0, - "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,9,132,101,10 + "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,47,132,101,10 CONTROL "Sprites only [] Emulate only sprite vs. sprite collisions.",IDC_COLLISION1, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,9,147,101,10 + "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,47,147,101,10 CONTROL "Sprites and Sprites vs. Playfield [] Recommended collision emulation level.",IDC_COLLISION2, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,115,132,181,10 + "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,182,132,181,10 CONTROL "Full [] 100% collision hardware emulation. Only very few games need this option. Slowest.",IDC_COLLISION3, - "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,115,147,181,10 + "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,182,147,181,10 END IDD_CHIPSET2 DIALOGEX 0, 0, 396, 288 @@ -1312,7 +1312,6 @@ BEGIN IDD_CHIPSET, DIALOG BEGIN - BOTTOMMARGIN, 162 END IDD_CHIPSET2, DIALOG diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index f96a52a5..13ee13d0 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -303,6 +303,7 @@ frame_time_t read_processor_time_rdtsc (void) } frame_time_t read_processor_time (void) { + frame_time_t t; #if 0 static int cnt; @@ -313,9 +314,10 @@ frame_time_t read_processor_time (void) } #endif if (userdtsc) - return read_processor_time_rdtsc (); + t = read_processor_time_rdtsc (); else - return read_processor_time_qpf (); + t = read_processor_time_qpf (); + return t; } uae_u32 read_system_time (void) diff --git a/od-win32/win32.h b/od-win32/win32.h index e538a6e8..e43bfa79 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -19,15 +19,13 @@ #define LANG_DLL 1 //#define WINUAEBETA _T("") -#define WINUAEBETA _T("16") -#define WINUAEDATE MAKEBD(2012, 9, 8) +#define WINUAEBETA _T("17") +#define WINUAEDATE MAKEBD(2012, 9, 10) #define WINUAEEXTRA _T("") //#define WINUAEEXTRA _T("AmiKit Preview") #define WINUAEREV _T("") #define IHF_WINDOWHIDDEN 6 -#define NORMAL_WINDOW_STYLE (WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU | WS_SIZEBOX) - #define WINUAEAPPNAME _T("Arabuusimiehet.WinUAE") extern HMODULE hUIDLL; extern HWND hAmigaWnd, hMainWnd, hHiddenWnd, hGUIWnd; diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 09fc5f41..607031ee 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -3379,14 +3379,13 @@ static int create_windows_2 (void) int dxfs = currentmode->flags & (DM_DX_FULLSCREEN); int d3dfs = currentmode->flags & (DM_D3D_FULLSCREEN); int fsw = currentmode->flags & (DM_W_FULLSCREEN); - DWORD exstyle = currprefs.win32_notaskbarbutton ? WS_EX_TOOLWINDOW : WS_EX_APPWINDOW; + DWORD exstyle = (currprefs.win32_notaskbarbutton ? WS_EX_TOOLWINDOW : WS_EX_APPWINDOW) | 0; DWORD flags = 0; int borderless = currprefs.win32_borderless; - DWORD style = NORMAL_WINDOW_STYLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; - int cymenu = currprefs.win32_statusbar == 0 ? 0 : GetSystemMetrics (SM_CYMENU); - int cyborder = GetSystemMetrics (SM_CYBORDER); - int cxborder = GetSystemMetrics (SM_CXBORDER); - int gap = 3; + DWORD style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + int sbheight = currprefs.win32_statusbar == 0 ? 0 : GetSystemMetrics (SM_CYMENU) + 3; + int cyborder = GetSystemMetrics (SM_CYFRAME); + int gap = 0; int x, y, w, h; struct MultiDisplay *md = getdisplay (&currprefs); @@ -3441,8 +3440,8 @@ static int create_windows_2 (void) y = r.top; SetWindowPos (hMainWnd, HWND_TOP, x, y, w + window_extra_width, h + window_extra_height, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING | SWP_NOZORDER); - x = gap - 1; - y = gap - 2; + x = gap; + y = gap; } SetWindowPos (hAmigaWnd, HWND_TOP, x, y, w, h, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING | SWP_NOZORDER); @@ -3471,13 +3470,13 @@ static int create_windows_2 (void) window_led_drives = 0; window_led_drives_end = 0; hMainWnd = NULL; - x = 2; y = 2; + x = 0; y = 0; if (borderless) - cymenu = cyborder = cxborder = 0; + sbheight = cyborder = 0; if (!dxfs && !d3dfs) { RECT rc; - int stored_x = 1, stored_y = cymenu + cyborder; + int stored_x = 1, stored_y = sbheight + cyborder; int oldx, oldy; int first = 2; @@ -3493,8 +3492,8 @@ static int create_windows_2 (void) first--; if (stored_x < GetSystemMetrics (SM_XVIRTUALSCREEN)) stored_x = GetSystemMetrics (SM_XVIRTUALSCREEN); - if (stored_y < GetSystemMetrics (SM_YVIRTUALSCREEN) + cymenu + cyborder) - stored_y = GetSystemMetrics (SM_YVIRTUALSCREEN) + cymenu + cyborder; + if (stored_y < GetSystemMetrics (SM_YVIRTUALSCREEN) + sbheight + cyborder) + stored_y = GetSystemMetrics (SM_YVIRTUALSCREEN) + sbheight + cyborder; if (stored_x > GetSystemMetrics (SM_CXVIRTUALSCREEN)) rc.left = 1; @@ -3506,8 +3505,8 @@ static int create_windows_2 (void) else rc.top = stored_y; - rc.right = rc.left + gap + currentmode->current_width + gap - 2; - rc.bottom = rc.top + gap + currentmode->current_height + gap + cymenu - 1 - 2; + rc.right = rc.left + gap + currentmode->current_width + gap; + rc.bottom = rc.top + gap + currentmode->current_height + gap + sbheight; oldx = rc.left; oldy = rc.top; @@ -3538,7 +3537,7 @@ static int create_windows_2 (void) _T("PCsuxRox"), _T("WinUAE"), style, rc.left, rc.top, - rc.right - rc.left + 1, rc.bottom - rc.top + 1, + rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInst, NULL); if (!hMainWnd) { write_log (_T("main window creation failed\n")); @@ -3594,14 +3593,17 @@ static int create_windows_2 (void) close_hwnds (); return 0; } - if (hMainWnd == NULL) + if (hMainWnd == NULL) { hMainWnd = hAmigaWnd; + } + GetWindowRect (hAmigaWnd, &amigawin_rect); GetWindowRect (hMainWnd, &mainwin_rect); if (dxfs || d3dfs) SetCursorPos (x + w / 2, y + h / 2); addnotifications (hAmigaWnd, FALSE, FALSE); createblankwindows (); + if (hMainWnd != hAmigaWnd) { if (!currprefs.headless && !rp_isactive ()) ShowWindow (hMainWnd, firstwindow ? (currprefs.win32_start_minimized ? SW_SHOWMINIMIZED : SW_SHOWDEFAULT) : SW_SHOWNORMAL); diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 5344cd6e..181e42c4 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -4805,8 +4805,7 @@ static void savelog (int all) copylog (_T("winuaebootlog"), bootlogpath, f); copylog (_T("winuaelog"), logpath, f); fputws (_T("\n"), f); - fputws (_T("configuration:"), f); - fputws (_T(":\n"), f); + fputws (_T("configuration:\n"), f); fputws (_T("\n"), f); saveconfig (f); fclose (f); @@ -6383,7 +6382,7 @@ static INT_PTR CALLBACK DisplayDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR if (LOWORD (wParam) == IDC_DA_RESET) { int *p; da_mode_selected = SendDlgItemMessage (hDlg, IDC_DA_MODE, CB_GETCURSEL, 0, 0); - p = getp_da(); + p = getp_da (); if (p) *p = 0; init_da (hDlg); diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 9ed441e8..0b026207 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,8 +1,18 @@ -- Use dos.library to detect between 1.x and 2.x (CDTV KS 1.3 + 2.x extended = exec is v37!) -- Removable disk support was disabled. + +- Use dos.library version to detect between 1.x and 2.x+ . CDTV KS 1.3 + 2.x extended ROM = v37 exec. +- Enabled removable media support. +- Merged new offical SVN updates. - restore only single input target to default. +Beta 17: + +- Enabled windowed mode window maximize button. +- Removed windowed mode window inner edge. +- -diskswapper command line looks inside all supported archive files. +- Any non-UAE controller harddrive didn't work. (b16) +- Beta 16 D3D alignment fix updated, previous broke 1:1 pixel mapping in some situations. + Beta 16: - Added easy to use log options to Paths panel. Open = open selected log or current config to text editor.