int res = currprefs.gfx_resolution;
int m = RP_SCREENMODE_1X;
int full = 0;
+ int dbl = 0;
if (WIN32GFX_IsPicassoScreen ()) {
full = currprefs.gfx_pfullscreen;
m = RP_SCREENMODE_2X;
if (res == 2)
m = RP_SCREENMODE_4X;
+ dbl = res >= 1 ? 1 : 0;
sm->lClipLeft = currprefs.gfx_xcenter_pos;
sm->lClipTop = currprefs.gfx_ycenter_pos;
- sm->lClipWidth = LORES_WIDTH << currprefs.gfx_resolution;
- sm->lClipHeight = LORES_HEIGHT << (currprefs.gfx_linedbl ? 1 : 0);
+ if (full) {
+ sm->lClipWidth = LORES_WIDTH << currprefs.gfx_resolution;
+ sm->lClipHeight = LORES_HEIGHT << (currprefs.gfx_linedbl ? 1 : 0);
+ } else {
+ sm->lClipWidth = currprefs.gfx_size_win.width << (RES_MAX - res);
+ sm->lClipHeight = currprefs.gfx_size_win.height << (1 - dbl);
+ }
}
if (full) {
int d = (currprefs.gfx_display + 1) << 8;
{
int res = RP_SCREENMODE_MODE (sm->dwScreenMode);
int fs = RP_SCREENMODE_DISPLAY (sm->dwScreenMode);
+ int dbl = 1;
minimized = 0;
if (fs)
changed_prefs.gfx_afullscreen = fs;
changed_prefs.gfx_resolution = res;
if (res == 0)
- changed_prefs.gfx_linedbl = 0;
+ dbl = changed_prefs.gfx_linedbl = 0;
+ else
+ dbl = changed_prefs.gfx_linedbl = 1;
+ if (sm->lClipWidth <= 0)
+ changed_prefs.gfx_size_win.width = LORES_WIDTH << res;
else
- changed_prefs.gfx_linedbl = 1;
- res = 1 << res;
- changed_prefs.gfx_size_win.width = default_width * res;
- changed_prefs.gfx_size_win.height = default_height * res;
+ changed_prefs.gfx_size_win.width = sm->lClipWidth >> (RES_MAX - res);
+ if (sm->lClipHeight <= 0)
+ changed_prefs.gfx_size_win.height = LORES_HEIGHT << dbl;
+ else
+ changed_prefs.gfx_size_win.height = sm->lClipHeight >> (1 - dbl);
+ if (fs) {
+ changed_prefs.gfx_size_fs.width = changed_prefs.gfx_size_win.width;
+ changed_prefs.gfx_size_fs.height = changed_prefs.gfx_size_win.height;
+ }
}
+ changed_prefs.gfx_xcenter_pos = sm->lClipLeft;
+ changed_prefs.gfx_ycenter_pos = sm->lClipTop;
updatewinfsmode (&changed_prefs);
WIN32GFX_DisplayChangeRequested ();
hwndset = 0;
sparse = 0;
hfsize = (uae_u64)hfsizem * 1024 * 1024;
if (IsDlgButtonChecked (hDlg, IDC_HF_SPARSE) == BST_CHECKED)
- sparse = -1;
+ sparse = 1;
if (!DiskSelection (hDlg, IDC_PATH_NAME, 3, &workprefs, newpath))
return FALSE;
GetDlgItemText (hDlg, IDC_PATH_NAME, init_path, MAX_DPATH);
if (*init_path && hfsize) {
SetCursor (LoadCursor(NULL, IDC_WAIT));
- if ((hf = CreateFile (init_path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL) ) != INVALID_HANDLE_VALUE) {
- DWORD mcl, fsf;
- if (GetVolumeInformationByHandleW (hf, NULL, 0, NULL, &mcl, &fsf, NULL, 0)) {
- if ((fsf & FILE_SUPPORTS_SPARSE_FILES) && sparse < 0)
- sparse = 1;
- }
- if (sparse > 0) {
+ if ((hf = CreateFile (init_path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)) != INVALID_HANDLE_VALUE) {
+ if (sparse) {
DWORD ret;
- int ok = 0;
- if (DeviceIoControl (hf, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &ret, NULL))
- result = 1;
+ DeviceIoControl (hf, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &ret, NULL);
}
if (hfsize >= 0x80000000) {
highword = (DWORD)(hfsize >> 32);