More such WindowLong fixes in win.c;
Fixed CD-ROM Bus setting in Settings.
This commit is contained in:
@@ -1255,7 +1255,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
||||
|
||||
hwndStatus = EmulatorStatusBar(hwnd, IDC_STATUS, hThisInstance);
|
||||
|
||||
OriginalStatusBarProcedure = GetWindowLongPtr(hwndStatus, GWL_WNDPROC);
|
||||
OriginalStatusBarProcedure = GetWindowLongPtr(hwndStatus, GWLP_WNDPROC);
|
||||
SetWindowLongPtr(hwndStatus, GWL_WNDPROC, (LONG_PTR) &StatusBarProcedure);
|
||||
|
||||
smenu = LoadMenu(hThisInstance, TEXT("StatusBarMenu"));
|
||||
@@ -1273,10 +1273,8 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
||||
}
|
||||
}
|
||||
|
||||
if (vid_resize) SetWindowLong(hwnd, GWL_STYLE, WS_OVERLAPPEDWINDOW|WS_VISIBLE);
|
||||
else SetWindowLong(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX)|WS_VISIBLE);
|
||||
|
||||
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_MINIMIZEBOX);
|
||||
if (vid_resize) SetWindowLongPtr(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_MINIMIZEBOX)|WS_VISIBLE);
|
||||
else SetWindowLongPtr(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX&~WS_MINIMIZEBOX)|WS_VISIBLE);
|
||||
|
||||
/* Note by Kiririn: I've redone this since the CD-ROM can be disabled but still have something inside it. */
|
||||
for (e = 0; e < CDROM_NUM; e++)
|
||||
@@ -1754,9 +1752,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
case IDM_VID_RESIZE:
|
||||
vid_resize=!vid_resize;
|
||||
CheckMenuItem(hmenu, IDM_VID_RESIZE, (vid_resize)?MF_CHECKED:MF_UNCHECKED);
|
||||
if (vid_resize) SetWindowLong(hwnd, GWL_STYLE, WS_OVERLAPPEDWINDOW|WS_VISIBLE);
|
||||
else SetWindowLong(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX)|WS_VISIBLE);
|
||||
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_MINIMIZEBOX);
|
||||
if (vid_resize) SetWindowLongPtr(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_MINIMIZEBOX)|WS_VISIBLE);
|
||||
else SetWindowLongPtr(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX&~WS_MINIMIZEBOX)|WS_VISIBLE);
|
||||
GetWindowRect(hwnd,&rect);
|
||||
SetWindowPos(hwnd, 0, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_FRAMECHANGED);
|
||||
GetWindowRect(hwndStatus,&rect);
|
||||
|
||||
@@ -3355,7 +3355,7 @@ static BOOL CALLBACK win_settings_removable_devices_proc(HWND hdlg, UINT message
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_BUS);
|
||||
if (temp_cdrom_drives[cdlv_current_sel].bus_type > 1)
|
||||
{
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom_drives[cdlv_current_sel].bus_type, 0);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom_drives[cdlv_current_sel].bus_type - 1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3413,7 +3413,7 @@ static BOOL CALLBACK win_settings_removable_devices_proc(HWND hdlg, UINT message
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_BUS);
|
||||
if (temp_cdrom_drives[cdlv_current_sel].bus_type > 1)
|
||||
{
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom_drives[cdlv_current_sel].bus_type, 0);
|
||||
SendMessage(h, CB_SETCURSEL, temp_cdrom_drives[cdlv_current_sel].bus_type - 1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user