"sound_pri_cutoff", "sound_pri_time", "sound_min_buff",
"gfx_test_speed", "gfxlib_replacement", "enforcer", "catweasel_io",
"kickstart_key_file", "fast_copper", "sound_adjust",
- "serial_hardware_dtrdsr",
+ "serial_hardware_dtrdsr", "gfx_filter_upscale",
0
};
cfgfile_write (f, "parallel_postscript_detection=%s\n", p->parallel_postscript_detection ? "yes" : "no");
cfgfile_write (f, "ghostscript_parameters=%s\n", p->ghostscript_parameters);
cfgfile_write (f, "parallel_autoflush=%d\n", p->parallel_autoflush_time);
+ cfgfile_dwrite (f, "uae_hide=%d\n", p->uae_hide);
cfgfile_dwrite (f, "gfx_display=%d\n", p->gfx_display);
cfgfile_dwrite (f, "gfx_display_name=%s\n", p->gfx_display_name);
cfgfile_dwrite (f, "gfx_filter_gamma=%d\n", p->gfx_filter_gamma);
cfgfile_dwrite (f, "gfx_filter_blur=%d\n", p->gfx_filter_blur);
cfgfile_dwrite (f, "gfx_filter_noise=%d\n", p->gfx_filter_noise);
- cfgfile_dwrite (f, "gfx_filter_upscale=%s\n", p->gfx_filter_upscale ? "true" : "false");
+ cfgfile_dwrite (f, "gfx_filter_keep_aspect=%s\n", p->gfx_filter_aspect ? "true" : "false");
cfgfile_dwrite (f, "gfx_luminance=%d\n", p->gfx_luminance);
cfgfile_dwrite (f, "gfx_contrast=%d\n", p->gfx_contrast);
|| cfgfile_intval (option, value, "gfx_filter_gamma", &p->gfx_filter_gamma, 1)
|| cfgfile_intval (option, value, "gfx_filter_blur", &p->gfx_filter_blur, 1)
|| cfgfile_intval (option, value, "gfx_filter_noise", &p->gfx_filter_noise, 1)
- || cfgfile_yesno (option, value, "gfx_filter_upscale", &p->gfx_filter_upscale)
+ || cfgfile_yesno (option, value, "gfx_filter_keep_aspect", &p->gfx_filter_aspect)
|| cfgfile_intval (option, value, "gfx_luminance", &p->gfx_luminance, 1)
|| cfgfile_intval (option, value, "gfx_contrast", &p->gfx_contrast, 1)
|| cfgfile_intval (option, value, "gfx_gamma", &p->gfx_gamma, 1)
|| cfgfile_intval (option, value, "floppy3type", &p->dfxtype[3], 1)
|| cfgfile_intval (option, value, "maprom", &p->maprom, 1)
|| cfgfile_intval (option, value, "parallel_autoflush", &p->parallel_autoflush_time, 1)
+ || cfgfile_intval (option, value, "uae_hide", &p->uae_hide, 1)
|| cfgfile_intval (option, value, "catweasel", &p->catweasel, 1))
return 1;
p->parallel_postscript_detection = 0;
p->parallel_autoflush_time = 5;
p->ghostscript_parameters[0] = 0;
+ p->uae_hide = 0;
p->jports[0].id = JSEM_MICE;
p->jports[1].id = JSEM_KBDLAYOUT;
each line that needs to be drawn. These are basically extracted out of
bit fields in the hardware registers. */
static int bplehb, bplham, bpldualpf, bpldualpfpri, bpldualpf2of, bplplanecnt, bplres, ecsshres, issprites;
-static int plf1pri, plf2pri;
+static int plf1pri, plf2pri, bplxor;
static uae_u32 plf_sprite_mask;
static int sbasecol[2] = { 16, 16 };
static int brdsprt, brdblank, brdblank_changed;
uae_u16 *buf = spixels + e->first_pixel;
uae_u8 *stbuf = spixstate.bytes + e->first_pixel;
int pos, window_pos, spr_level, spr_level_max;
-#ifdef AGA
- uae_u8 xor_val = (uae_u8)(dp_for_drawing->bplcon4 >> 8);
-#endif
buf -= e->pos;
stbuf -= e->pos;
sbasecol[0] = ((dp_for_drawing->bplcon4 >> 4) & 15) << 4;
sbasecol[1] = ((dp_for_drawing->bplcon4 >> 0) & 15) << 4;
brdsprt = !brdblank && (currprefs.chipset_mask & CSMASK_AGA) && (dp_for_drawing->bplcon0 & 1) && (dp_for_drawing->bplcon3 & 0x02);
+ bplxor = dp_for_drawing->bplcon4 >> 8;
#endif
}
break;
#endif
#ifdef AGA
- case 0x108:
+ case 0x10c:
dp_for_drawing->bplcon4 = v;
break;
#endif
/* Stack */
a7 = m68k_areg (®s, 7);
for (i = 0; i < 8 * STACKLINES; i++) {
- a7 -= 4;
+ a7 += 4;
if (!(i % 8)) {
strcpy (enforcer_buf_ptr, "Stck:");
enforcer_buf_ptr += strlen (enforcer_buf_ptr);
}
for (i = 0; i < 8 * STACKLINES; i++) {
- a7 -= 4;
+ a7 += 4;
if (enforcer_decode_hunk_and_offset (buf, get_long (a7))) {
int l = strlen (buf);
#include "ncr_scsi.h"
#include "debug.h"
-static int scrambled_autoconfig = 0;
-
#define MAX_EXPANSION_BOARDS 8
/* ********************************************************** */
static void expamem_init_fastcard (void)
{
- uae_u16 mid = currprefs.cs_a2091 ? commodore : uae_id;
- uae_u8 pid = currprefs.cs_a2091 ? commodore_a2091_ram : 1;
+ uae_u16 mid = (currprefs.cs_a2091 || currprefs.uae_hide) ? commodore : uae_id;
+ uae_u8 pid = (currprefs.cs_a2091 || currprefs.uae_hide) ? commodore_a2091_ram : 1;
expamem_init_clear ();
if (allocated_fastmem == 0x100000)
uaecptr b = RTAREA_DEFAULT;
addrbank *ab;
- if (currprefs.cs_cdtvcd || currprefs.cs_cdtvscsi)
+ if (currprefs.cs_cdtvcd || currprefs.cs_cdtvscsi || currprefs.uae_hide > 1)
b = RTAREA_BACKUP;
ab = &get_mem_bank (RTAREA_DEFAULT);
if (ab) {
int cardno = 0;
ecard = 0;
- if (scrambled_autoconfig)
- uae_id = rand () & 2047 + 100;
+ if (currprefs.uae_hide)
+ uae_id = commodore;
else
uae_id = hackers_id;
outlnf ( " %s *buf = (%s *) xlinebuffer;", get_depth_type_str (bpp), get_depth_type_str (bpp));
if (aga)
- outln ( " uae_u8 xor_val = (uae_u8)(dp_for_drawing->bplcon4 >> 8);");
+ outln ( " uae_u8 xor_val = bplxor;");
outln ( "");
outln ( " if (dp_for_drawing->ham_seen) {");
extern void write_inputdevice_config (struct uae_prefs *p, struct zfile *f);
extern void read_inputdevice_config (struct uae_prefs *p, char *option, char *value);
extern void reset_inputdevice_config (struct uae_prefs *pr);
-extern void inputdevice_joyport_config (struct uae_prefs *p, char *value, int portnum, int type);
+extern int inputdevice_joyport_config (struct uae_prefs *p, char *value, int portnum, int type);
extern void inputdevice_init (void);
extern void inputdevice_close (void);
int gfx_filter_filtermode;
int gfx_filter_noise, gfx_filter_blur;
int gfx_filter_saturation, gfx_filter_luminance, gfx_filter_contrast, gfx_filter_gamma;
- int gfx_filter_upscale;
+ int gfx_filter_aspect;
int immediate_blits;
unsigned int chipset_mask;
int filesys_no_uaefsdb;
int filesys_custom_uaefsdb;
int mmkeyboard;
+ int uae_hide;
int mountitems;
struct uaedev_config_info mountconfig[MOUNT_CONFIG_SIZE];
#endif
extern void write_dlog (const char *, ...);
+extern void flush_log (void);
extern void close_console (void);
extern void reopen_console (void);
extern void console_out (const char *);
return v;
}
-void inputdevice_joyport_config (struct uae_prefs *p, char *value, int portnum, int type)
+int inputdevice_joyport_config (struct uae_prefs *p, char *value, int portnum, int type)
{
switch (type)
{
char *name2 = idf->get_uniquename (i);
if ((name1 && !strcmp (name1, value)) || (name2 && !strcmp (name2, value))) {
p->jports[portnum].id = idnum + i;
- return;
+ return 1;
}
}
}
}
if (got == 2) {
p->jports[portnum].id = start;
+ return 1;
}
}
}
break;
}
+ return 0;
}
\ No newline at end of file
void fixup_prefs_dimensions (struct uae_prefs *prefs)
{
if (prefs->gfx_xcenter_size > 0)
- prefs->gfx_size_win.width = prefs->gfx_xcenter_size << prefs->gfx_resolution;
+ prefs->gfx_size_win.width = prefs->gfx_xcenter_size >> (RES_MAX - prefs->gfx_resolution);
if (prefs->gfx_ycenter_size > 0)
- prefs->gfx_size_win.height = prefs->gfx_ycenter_size << (prefs->gfx_linedbl ? 1 : 0);
+ prefs->gfx_size_win.height = (prefs->gfx_ycenter_size * 2) >> (RES_MAX - (prefs->gfx_resolution == RES_SUPERHIRES ? 2 : (prefs->gfx_linedbl ? 1 : 0)));
fixup_prefs_dim2 (&prefs->gfx_size_fs);
fixup_prefs_dim2 (&prefs->gfx_size_win);
}
memcpy (kickmemory, fkickmemory, fkickmem_size / 2);
memcpy (kickmemory + fkickmem_size / 2, fkickmemory, fkickmem_size / 2);
if (!extendedkickmemory) {
- if (need_uae_boot_rom() != 0xf00000) {
+ if (need_uae_boot_rom () != 0xf00000) {
extendedkickmem_size = 65536;
extendedkickmem_mask = extendedkickmem_size - 1;
extendedkickmemory = mapped_malloc (extendedkickmem_size, "rom_f0");
static void close_scsi_device (int unitnum)
{
- write_log ("SPTI: unit %d closed\n", unitnum);
- if (dev_info[unitnum].handle != INVALID_HANDLE_VALUE)
+ if (dev_info[unitnum].handle != INVALID_HANDLE_VALUE) {
+ write_log ("SPTI: unit %d closed\n", unitnum);
CloseHandle (dev_info[unitnum].handle);
+ }
dev_info[unitnum].handle = INVALID_HANDLE_VALUE;
}
free_scsi_device(i);
}
+static void checkcapabilities (int unitnum)
+{
+ struct dev_info_spti *di = &dev_info[unitnum];
+ STORAGE_ADAPTER_DESCRIPTOR desc;
+ STORAGE_PROPERTY_QUERY query = { 0 };
+ DWORD ret, status;
+
+ query.PropertyId = StorageAdapterProperty;
+ query.QueryType = PropertyStandardQuery;
+ status = DeviceIoControl (di->handle, IOCTL_STORAGE_QUERY_PROPERTY,
+ &query, sizeof query, &desc, sizeof desc, &ret, NULL);
+ if (status) {
+ if (desc.Version > offsetof (STORAGE_ADAPTER_DESCRIPTOR, BusType))
+ write_log ("CAPS: BusType=%d, MaxTransfer=0x%08X, Mask=0x%08X\n",
+ desc.BusType, desc.MaximumTransferLength, desc.AlignmentMask);
+ }
+}
+
static int inquiry (int unitnum, struct dev_info_spti *di, uae_u8 *inquirydata)
{
uae_u8 cmd[6] = { 0x12,0,0,0,36,0 }; /* INQUIRY */
if (dev_info[unitnum].handle == INVALID_HANDLE_VALUE)
return 0;
outlen = 32;
- p = execscsicmd_in(unitnum, cmd1, sizeof cmd1, &outlen);
+ p = execscsicmd_in (unitnum, cmd1, sizeof cmd1, &outlen);
if (p && outlen >= 8) {
di->bytespersector = (p[4] << 24) | (p[5] << 16) | (p[6] << 8) | p[7];
di->sectorspertrack = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
if (di->type == INQ_DASD) {
uae_u8 cmd2[10] = { 0x5a,0x08,0,0,0,0,0,0,0xf0,0 }; /* MODE SENSE */
outlen = 32;
- p = execscsicmd_in(unitnum, cmd2, sizeof cmd2, &outlen);
+ p = execscsicmd_in (unitnum, cmd2, sizeof cmd2, &outlen);
if (p && outlen >= 4) {
di->write_protected = (p[3] & 0x80) ? 1 : 0;
}
write_log ("SPTI: failed to open unit %d err=%d ('%s')\n", unitnum, GetLastError(), dev);
} else {
uae_u8 inqdata[INQUIRY_SIZE + 1] = { 0 };
+ checkcapabilities (unitnum);
if (!inquiry (unitnum, di, inqdata)) {
write_log ("SPTI: inquiry failed unit %d ('%s':%d:%d:%d:%d)\n", unitnum, dev,
di->bus, di->path, di->target, di->lun);
di->lun = lunid;
di->scanmode = scanmode;
total_devices++;
- if (open_scsi_device(cnt)) {
+ if (open_scsi_device (cnt)) {
for (i = 0; i < cnt; i++) {
if (!memcmp(di->inquirydata, dev_info[i].inquirydata, INQUIRY_SIZE) && di->scanmode != dev_info[i].scanmode) {
write_log ("duplicate device, skipped..\n");
#define RP_SCREENMODE_FULLSCREEN_1 0x00000100 // full screen on primary (default) display
#define RP_SCREENMODE_FULLSCREEN_2 0x00000200 // full screen on secondary display (fallback to 1 if unavailable)
#define RP_SCREENMODE_FULLWINDOW 0x00010000 // use "full window" when in fullscreen (no gfx card full screen)
+#define RP_SCREENMODE_XX 0x000000FF
#define RP_SCREENMODE_MODE(m) ((m) & 0x000000FF) // given a mode 'm' returns the #X mode
#define RP_SCREENMODE_DISPLAY(m) (((m) >> 8) & 0x000000FF) // given a mode 'm' returns the display number (1-255) or 0 if full screen is not active
dxdata.backbuffers = 0;
}
+static HRESULT restoresurface_2 (LPDIRECTDRAWSURFACE7 surf)
+{
+ HRESULT ddrval;
+
+ if (surf == dxdata.flipping[0] || surf == dxdata.flipping[1])
+ surf = dxdata.primary;
+ ddrval = IDirectDrawSurface7_Restore (surf);
+ if (SUCCEEDED (ddrval)) {
+ if (surf == dxdata.primary && dxdata.palette)
+ IDirectDrawSurface7_SetPalette (dxdata.primary, dxdata.palette);
+ }
+ return ddrval;
+}
+
HRESULT restoresurface (LPDIRECTDRAWSURFACE7 surf)
{
HRESULT ddrval;
if (surf == dxdata.flipping[0] || surf == dxdata.flipping[1])
surf = dxdata.primary;
ddrval = IDirectDrawSurface7_Restore (surf);
- if (FAILED (ddrval))
+ if (FAILED (ddrval)) {
write_log ("IDirectDrawSurface7_Restore: %s\n", DXError (ddrval));
- if (surf == dxdata.primary && dxdata.palette)
- IDirectDrawSurface7_SetPalette (dxdata.primary, dxdata.palette);
+ } else {
+ if (surf == dxdata.primary && dxdata.palette)
+ IDirectDrawSurface7_SetPalette (dxdata.primary, dxdata.palette);
+ }
return ddrval;
}
desc->dwSize = sizeof (*desc);
while (FAILED (ddrval = IDirectDrawSurface7_Lock (surf, NULL, desc, DDLOCK_SURFACEMEMORYPTR | DDLOCK_WAIT, NULL))) {
if (ddrval == DDERR_SURFACELOST) {
- ddrval = restoresurface (surf);
+ ddrval = restoresurface_2 (surf);
if (FAILED (ddrval))
return 0;
} else if (ddrval != DDERR_SURFACEBUSY) {
return ddrval;
}
-HRESULT DirectDraw_SetCooperativeLevel (HWND window, int fullscreen)
+HRESULT DirectDraw_SetCooperativeLevel (HWND window, int fullscreen, int doset)
{
HRESULT ddrval;
- dxdata.hwnd = window;
- ddrval = IDirectDraw7_SetCooperativeLevel (dxdata.maindd, window, fullscreen ?
- DDSCL_ALLOWREBOOT | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN : DDSCL_NORMAL);
- if (FAILED (ddrval))
- write_log ("IDirectDraw7_SetCooperativeLevel: %s\n", DXError (ddrval));
+ if (doset) {
+ dxdata.hwnd = window;
+ ddrval = IDirectDraw7_SetCooperativeLevel (dxdata.maindd, window, fullscreen ?
+ DDSCL_ALLOWREBOOT | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN : DDSCL_NORMAL);
+ if (FAILED (ddrval))
+ write_log ("IDirectDraw7_SetCooperativeLevel: SET %s\n", DXError (ddrval));
+ } else {
+ ddrval = IDirectDraw7_SetCooperativeLevel (dxdata.maindd, dxdata.hwnd, DDSCL_NORMAL);
+ if (FAILED (ddrval))
+ write_log ("IDirectDraw7_SetCooperativeLevel: RESET %s\n", DXError (ddrval));
+ }
return ddrval;
}
void DirectDraw_FreeMainSurface (void);
HRESULT DirectDraw_CreateMainSurface (int width, int height);
HRESULT DirectDraw_SetDisplayMode(int width, int height, int bits, int freq);
-HRESULT DirectDraw_SetCooperativeLevel (HWND window, int fullscreen);
+HRESULT DirectDraw_SetCooperativeLevel (HWND window, int fullscreen, int doset);
HRESULT DirectDraw_CreateClipper (void);
HRESULT DirectDraw_SetClipper(HWND hWnd);
RGBFTYPE DirectDraw_GetSurfacePixelFormat(LPDDSURFACEDESC2 surface);
{
int ret;
- if (!hfd->emptyname)
+ if (!hfd || !hfd->emptyname)
return;
if (*rescanned == 0) {
hdf_init2 (1);
#define IDC_AVIOUTPUT_8BIT 1620
#define IDC_INPREC_PLAY 1620
#define IDC_FILTERUPSCALE 1620
+#define IDC_FILTERASPECT 1620
#define IDC_AVIOUTPUT_24BIT 1621
#define IDC_AVIOUTPUT_WIDTH 1622
#define IDC_AVIOUTPUT_HEIGHT 1623
#define IDC_FILTERVO 1619
#define IDC_AVIOUTPUT_8BIT 1620
#define IDC_INPREC_PLAY 1620
-#define IDC_FILTERUPSCALE 1620
+#define IDC_FILTERASPECT 1620
#define IDC_AVIOUTPUT_24BIT 1621
#define IDC_AVIOUTPUT_WIDTH 1622
#define IDC_AVIOUTPUT_HEIGHT 1623
COMBOBOX IDC_FILTERVZMULT,67,63,27,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
CONTROL "Autoscale",IDC_FILTERAUTORES,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,168,63,10\r
COMBOBOX IDC_FILTERXTRA,105,130,138,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
- CONTROL "Full screen filter",IDC_FILTERUPSCALE,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,9,153,87,10\r
+ CONTROL "Keep aspect ratio",IDC_FILTERASPECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,153,87,10\r
END\r
\r
IDD_HARDDRIVE DIALOGEX 0, 0, 380, 76\r
#include "win32.h"
#include "win32gfx.h"
#include "filesys.h"
+#include "gfxfilter.h"
static int initialized;
static RPGUESTINFO guestinfo;
static int minimized;
static DWORD hd_mask, cd_mask;
static int mousecapture, mousemagic;
+static int rp_filter, rp_filter_default;
-static int recursive_device;
+static int recursive_device, recursive;
+
+static int cando (void)
+{
+ if (!initialized)
+ return 0;
+ return 1;
+}
static void outhex (const uae_u8 *s)
{
}
}
-static int port_insert (int num, const char *name)
+static void trimws (char *s)
+{
+ /* Delete trailing whitespace. */
+ int len = strlen (s);
+ while (len > 0 && strcspn (s + len - 1, "\t \r\n") == 0)
+ s[--len] = '\0';
+}
+
+static int port_insert2 (int num, const char *name)
{
- char tmp1[100], tmp2[200];
+ char tmp2[1000];
int i, type;
- if (num < 0 || num > 1)
- return FALSE;
- if (strlen (name) == 0) {
- inputdevice_joyport_config (&changed_prefs, "none", num, 0);
- return TRUE;
- }
- if (strlen (name) >= sizeof (tmp2) - 1)
- return FALSE;
type = 1;
strcpy (tmp2, name);
for (i = 1; i <= 4; i++) {
+ char tmp1[1000];
sprintf (tmp1, "Mouse%d", i);
if (!strcmp (name, tmp1)) {
sprintf (tmp2, "mouse%d", i - 1);
break;
}
}
- inputdevice_joyport_config (&changed_prefs, tmp2, num, type);
- return TRUE;
+ trimws (tmp2);
+ return inputdevice_joyport_config (&changed_prefs, tmp2, num, type);
+}
+
+static int port_insert (int num, const char *name)
+{
+ char tmp1[1000];
+
+ if (num < 0 || num > 1)
+ return FALSE;
+ if (strlen (name) == 0) {
+ inputdevice_joyport_config (&changed_prefs, "none", num, 0);
+ return TRUE;
+ }
+ if (strlen (name) >= sizeof (tmp1) - 1)
+ return FALSE;
+
+ strcpy (tmp1, name);
+ for (;;) {
+ char *p = strrchr (tmp1, '\\');
+ if (p) {
+ int v = port_insert2 (num, p + 1);
+ if (v)
+ return TRUE;
+ *p = 0;
+ continue;
+ }
+ return port_insert2 (num, tmp1);
+ }
}
static BOOL RPSendMessagex (UINT uMessage, WPARAM wParam, LPARAM lParam,
LPCVOID pData, DWORD dwDataSize, const RPGUESTINFO *pInfo, LRESULT *plResult)
{
- BOOL v;
-
+ BOOL v = FALSE;
+ static int cnt;
+ int ncnt;
+
if (!pInfo) {
write_log ("RPSEND: pInfo == NULL!\n");
return FALSE;
write_log ("RPSEND: pInfo->hHostMessageWindow == NULL!\n");
return FALSE;
}
+ recursive++;
+ cnt++;
+ ncnt = cnt;
+ if (log_rp)
+ write_log ("RPSEND_%d->\n", ncnt);
v = RPSendMessage (uMessage, wParam, lParam, pData, dwDataSize, pInfo, plResult);
+ recursive--;
if (log_rp) {
- write_log ("RPSEND(%s [%d], %08x, %08x, %08x, %d)\n",
+ write_log ("RPSEND_%d(%s [%d], %08x, %08x, %08x, %d)\n", ncnt,
getmsg (uMessage), uMessage - WM_APP, wParam, lParam, pData, dwDataSize);
if (v == FALSE)
write_log("ERROR %d\n", GetLastError ());
#define LORES_WIDTH 360
#define LORES_HEIGHT 284
-static void get_screenmode (struct RPScreenMode *sm)
+static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
{
- int res = currprefs.gfx_resolution;
+ int res = p->gfx_resolution;
int m = RP_SCREENMODE_1X;
int full = 0;
int dbl = 0;
if (WIN32GFX_IsPicassoScreen ()) {
- full = currprefs.gfx_pfullscreen;
+ full = p->gfx_pfullscreen;
sm->lClipTop = 0;
sm->lClipLeft = 0;
sm->lClipHeight = picasso96_state.Height;
sm->lClipWidth = picasso96_state.Width;
} else {
- full = currprefs.gfx_afullscreen;
- if (res == 1)
+ full = p->gfx_afullscreen;
+ dbl = res >= 1 ? 1 : 0;
+ if (res == RES_HIRES)
m = RP_SCREENMODE_2X;
- if (res == 2)
+ if (res == RES_SUPERHIRES) {
m = RP_SCREENMODE_4X;
- dbl = res >= 1 ? 1 : 0;
- sm->lClipLeft = currprefs.gfx_xcenter_pos;
- sm->lClipTop = currprefs.gfx_ycenter_pos;
+ dbl = 2;
+ }
+ if (log_rp)
+ write_log ("GET_RPSM: res=%d dbl=%d full=%d xcpos=%d ycpos=%d w=%d h=%d\n",
+ res, dbl, full,
+ p->gfx_xcenter_pos, p->gfx_ycenter_pos,
+ p->gfx_size_win.width, p->gfx_size_win.height);
+ sm->lClipLeft = p->gfx_xcenter_pos <= 0 ? -1 : p->gfx_xcenter_pos;
+ sm->lClipTop = p->gfx_ycenter_pos <= 0 ? -1 : p->gfx_ycenter_pos;
if (full) {
- sm->lClipWidth = LORES_WIDTH << currprefs.gfx_resolution;
- sm->lClipHeight = LORES_HEIGHT << (currprefs.gfx_linedbl ? 1 : 0);
+ sm->lClipWidth = LORES_WIDTH << RES_MAX;
+ sm->lClipHeight = LORES_HEIGHT << dbl;
} else {
- sm->lClipWidth = currprefs.gfx_size_win.width << (RES_MAX - res);
- sm->lClipHeight = currprefs.gfx_size_win.height << (1 - dbl);
+ sm->lClipWidth = p->gfx_size_win.width << (RES_MAX - res);
+ sm->lClipHeight = (p->gfx_size_win.height * 2) >> (2 - dbl);
}
}
if (full) {
- int d = (currprefs.gfx_display + 1) << 8;
m &= ~0x0000ff00;
- m |= d;
+ m |= p->gfx_display << 8;
}
+ if (full > 1)
+ m |= RP_SCREENMODE_FULLWINDOW;
sm->dwScreenMode = m;
+
+ if (log_rp)
+ write_log ("GET_RPSM: %08X %dx%d %dx%d res=%d disp=%d fs=%d\n",
+ sm->dwScreenMode, sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight,
+ res, p->gfx_display, full);
}
-static void set_screenmode (struct RPScreenMode *sm)
+static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
{
int res = RP_SCREENMODE_MODE (sm->dwScreenMode);
- int fs = RP_SCREENMODE_DISPLAY (sm->dwScreenMode);
+ int display = RP_SCREENMODE_DISPLAY (sm->dwScreenMode);
+ int fs = 0;
int dbl = 1;
+ struct MultiDisplay *disp;
minimized = 0;
- if (fs)
- changed_prefs.gfx_display = fs - 1;
- if (WIN32GFX_IsPicassoScreen ()) {
- changed_prefs.gfx_pfullscreen = fs;
- } else {
- changed_prefs.gfx_afullscreen = fs;
- changed_prefs.gfx_resolution = res;
- if (res == 0)
- dbl = changed_prefs.gfx_linedbl = 0;
+ if (display) {
+ p->gfx_display = display;
+ if (sm->dwScreenMode & RP_SCREENMODE_FULLWINDOW)
+ fs = 2;
else
- dbl = changed_prefs.gfx_linedbl = 1;
+ fs = 1;
+ if (res > RP_SCREENMODE_2X)
+ res = RP_SCREENMODE_2X;
+ }
+ disp = getdisplay (p);
+
+ if (log_rp)
+ write_log ("SET_RPSM: %08X %dx%d %dx%d res=%d disp=%d fs=%d\n",
+ sm->dwScreenMode, sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight,
+ res, display, fs);
+
+ if (!WIN32GFX_IsPicassoScreen ()) {
+ p->gfx_resolution = res == RP_SCREENMODE_4X ? RES_SUPERHIRES : res;
+ if (res == 0) {
+ dbl = dbl = p->gfx_linedbl = 0;
+ } else {
+ dbl = p->gfx_linedbl = 1;
+ if (res == RP_SCREENMODE_4X)
+ dbl = 2;
+ }
if (sm->lClipWidth <= 0)
- changed_prefs.gfx_size_win.width = LORES_WIDTH << res;
+ p->gfx_size_win.width = LORES_WIDTH << p->gfx_resolution;
else
- changed_prefs.gfx_size_win.width = sm->lClipWidth >> (RES_MAX - res);
+ p->gfx_size_win.width = sm->lClipWidth >> (RES_MAX - p->gfx_resolution);
if (sm->lClipHeight <= 0)
- changed_prefs.gfx_size_win.height = LORES_HEIGHT << dbl;
+ p->gfx_size_win.height = LORES_HEIGHT << dbl;
else
- changed_prefs.gfx_size_win.height = sm->lClipHeight >> (1 - dbl);
+ p->gfx_size_win.height = (sm->lClipHeight * 2) >> (2 - dbl);
+ if (fs == 1) {
+ p->gfx_size_fs.width = p->gfx_size_win.width;
+ p->gfx_size_fs.height = p->gfx_size_win.height;
+ } else if (fs == 2) {
+ p->gfx_size_fs.width = disp->rect.right - disp->rect.left;
+ p->gfx_size_fs.height = disp->rect.bottom - disp->rect.top;
+ }
+ p->gfx_filter = rp_filter_default;
+ p->gfx_filter_horiz_zoom_mult = 1000;
+ p->gfx_filter_vert_zoom_mult = 1000;
+ if (log_rp)
+ write_log ("WW=%d WH=%d FW=%d FH=%d\n",
+ p->gfx_size_win.width, p->gfx_size_win.height,
+ p->gfx_size_fs.width, p->gfx_size_fs.height);
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;
+ if (res == RP_SCREENMODE_XX) {
+ p->gfx_filter_horiz_zoom_mult = 0;
+ p->gfx_filter_vert_zoom_mult = 0;
+ p->gfx_filter = rp_filter;
+ } else {
+ int mult;
+ int prevmult = 1;
+ for (mult = 2; mult <= 4; mult+=2) {
+ int w = p->gfx_size_win.width;
+ int h = p->gfx_size_win.height;
+ if (p->gfx_size_fs.width < w * mult || p->gfx_size_fs.height < h * mult) {
+ mult = prevmult;
+ break;
+ }
+ prevmult = mult;
+ }
+ if (mult > 1 || fs == 2) {
+ p->gfx_filter = rp_filter;
+ p->gfx_filter_horiz_zoom_mult = 1000 / mult;
+ p->gfx_filter_vert_zoom_mult = 1000 / mult;
+ }
+ }
+ } else {
+ if (res == RP_SCREENMODE_4X) {
+ p->gfx_filter = rp_filter;
+ p->gfx_filter_horiz_zoom_mult = 1000;
+ p->gfx_filter_vert_zoom_mult = 500;
+ }
}
+
}
- changed_prefs.gfx_xcenter_pos = sm->lClipLeft;
- changed_prefs.gfx_ycenter_pos = sm->lClipTop;
- updatewinfsmode (&changed_prefs);
- WIN32GFX_DisplayChangeRequested ();
+#if 0
+ p->gfx_filter = UAE_FILTER_NULL;
+ p->gfx_filter_horiz_zoom_mult = 1000;
+ p->gfx_filter_vert_zoom_mult = 1000;
+#endif
+ p->gfx_pfullscreen = fs;
+ p->gfx_afullscreen = fs;
+ p->gfx_xcenter_pos = sm->lClipLeft;
+ p->gfx_ycenter_pos = sm->lClipTop;
+ updatewinfsmode (p);
hwndset = 0;
}
case RPIPCHM_SCREENMODE:
{
struct RPScreenMode *sm = (struct RPScreenMode*)pData;
- set_screenmode (sm);
+ set_screenmode (sm, &changed_prefs);
return (LRESULT)INVALID_HANDLE_VALUE;
}
case RPIPCHM_EVENT:
void rp_free (void)
{
- if (!initialized)
+ if (!cando ())
return;
+ if (hwndset)
+ rp_set_hwnd (NULL);
initialized = 0;
RPSendMessagex (RPIPCGM_CLOSED, 0, 0, NULL, 0, &guestinfo, NULL);
RPUninitializeGuest (&guestinfo);
{
LRESULT lr;
if (!initialized)
- return 0;
+ return NULL;
RPSendMessagex (RPIPCGM_PARENT, 0, 0, NULL, 0, &guestinfo, &lr);
return (HWND)lr;
}
feat = RP_FEATURE_POWERLED | RP_FEATURE_SCREEN1X | RP_FEATURE_FULLSCREEN;
feat |= RP_FEATURE_PAUSE | RP_FEATURE_TURBO | RP_FEATURE_VOLUME | RP_FEATURE_SCREENCAPTURE;
if (!WIN32GFX_IsPicassoScreen ())
- feat |= RP_FEATURE_SCREEN2X;
+ feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN4X;
RPSendMessagex (RPIPCGM_FEATURES, feat, 0, NULL, 0, &guestinfo, NULL);
}
void rp_fixup_options (struct uae_prefs *p)
{
int i, v;
+ struct RPScreenMode sm;
if (!initialized)
return;
- write_log ("rp_fixup_options(rpescapekey=%d,rpescapeholdtime=%d,screenmode=%d,inputmode=%d)\n",
+ write_log ("rp_fixup_options(escapekey=%d,escapeholdtime=%d,screenmode=%d,inputmode=%d)\n",
rp_rpescapekey, rp_rpescapeholdtime, rp_screenmode, rp_inputmode);
+ changed_prefs.win32_borderless = currprefs.win32_borderless = 1;
+ rp_filter_default = rp_filter = currprefs.gfx_filter;
+ if (rp_filter == 0)
+ rp_filter = UAE_FILTER_NULL;
+
+ get_screenmode (&sm, p);
+ sm.dwScreenMode = rp_screenmode;
+ set_screenmode (&sm, &currprefs);
+ set_screenmode (&sm, &changed_prefs);
+
sendfeatures ();
/* floppy drives */
}
}
RPSendMessagex (RPIPCGM_DEVICES, RP_DEVICE_HD, hd_mask, NULL, 0, &guestinfo, NULL);
+
+ rp_update_volume (&currprefs);
+ rp_turbo (turbo_emulation);
+ for (i = 0; i <= 4; i++)
+ rp_update_leds (i, 0);
}
static void rp_device_change (int dev, int num, const char *name)
int dc_size;
char np[MAX_DPATH];
- if (!initialized)
+ if (!cando ())
return;
if (recursive_device)
return;
void rp_hd_change (int num, int removed)
{
+ if (!cando ())
+ return;
if (removed)
hd_mask &= ~(1 << num);
else
void rp_cd_change (int num, int removed)
{
+ if (!cando ())
+ return;
if (removed)
cd_mask &= ~(1 << num);
else
void rp_floppy_track (int floppy, int track)
{
- if (!initialized)
+ if (!cando ())
return;
RPSendMessagex (RPIPCGM_DEVICESEEK, MAKEWORD (RP_DEVICE_FLOPPY, floppy), track, NULL, 0, &guestinfo, NULL);
}
void rp_update_leds (int led, int onoff)
{
- if (!initialized)
+ if (!cando ())
return;
if (led < 0 || led > 4)
return;
void rp_hd_activity (int num, int onoff)
{
- if (!initialized)
+ if (!cando ())
return;
if (num < 0)
return;
void rp_cd_activity (int num, int onoff)
{
- if (!initialized)
+ if (!cando ())
return;
if (num < 0)
return;
}
}
-void rp_update_status (struct uae_prefs *p)
+void rp_update_volume (struct uae_prefs *p)
{
- if (!initialized)
+ if (!cando ())
return;
RPSendMessagex (RPIPCGM_VOLUME, (WPARAM)(100 - p->sound_volume), 0, NULL, 0, &guestinfo, NULL);
}
{
int flags = 0;
- if (!initialized)
+ if (!cando ())
return;
if (mousemagic)
flags |= RP_MOUSECAPTURE_MAGICMOUSE;
void rp_activate (int active, LPARAM lParam)
{
- if (!initialized)
+ if (!cando ())
return;
RPSendMessagex (active ? RPIPCGM_ACTIVATED : RPIPCGM_DEACTIVATED, 0, lParam, NULL, 0, &guestinfo, NULL);
}
-#if 0
-void rp_minimize (int minimize)
-{
- if (!initialized)
- return;
- RPSendMessagex(minimize ? RPIPCGM_MINIMIZED : RPIPCGM_RESTORED, 0, 0, NULL, 0, &guestinfo, NULL);
-}
-#endif
-
void rp_turbo (int active)
{
- if (!initialized)
+ if (!cando ())
return;
RPSendMessagex (RPIPCGM_TURBO, RP_TURBO_CPU, active, NULL, 0, &guestinfo, NULL);
}
if (!initialized)
return;
- get_screenmode (&sm);
+ get_screenmode (&sm, &currprefs);
sm.hGuestWindow = hWnd;
- hwndset = 1;
+ if (hWnd != NULL)
+ hwndset = 1;
RPSendMessagex (RPIPCGM_SCREENMODE, 0, 0, &sm, sizeof sm, &guestinfo, NULL);
}
void rp_set_enabledisable (int enabled)
{
- if (!initialized)
+ if (!cando ())
return;
RPSendMessagex (enabled ? RPIPCGM_ENABLED : RPIPCGM_DISABLED, 0, 0, NULL, 0, &guestinfo, NULL);
}
void rp_rtg_switch (void)
{
- if (!initialized)
+ if (!cando ())
return;
sendfeatures ();
}
extern HRESULT rp_init (void);
extern void rp_free (void);
extern void rp_fixup_options (struct uae_prefs*);
-extern void rp_update_status (struct uae_prefs*);
+extern void rp_update_volume (struct uae_prefs*);
extern void rp_update_leds (int, int);
extern void rp_floppy_track (int floppy, int track);
extern void rp_hd_activity (int, int);
}
}
#ifdef RETROPLATFORM
- if (rp_isactive ())
+ if (rp_isactive () && isfullscreen () == 0)
donotfocus = 0;
#endif
if (donotfocus) {
cnt--;
if (cnt <= 0) {
figure_processor_speed ();
+ flush_log ();
cnt = 100;
}
}
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 12
+#define WINUAEBETA 13
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2008, 4, 5)
+#define WINUAEDATE MAKEBD(2008, 4, 20)
#define WINUAEEXTRA ""
#define WINUAEREV ""
{ UAE_FILTER_SCALE2X, 0, "Scale2X", "scale2x", 0, 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0 },
- { UAE_FILTER_HQ, 0, "hq2x", "hqx", 0, 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 },
+ { UAE_FILTER_HQ, 0, "hq2x/3x/4x", "hqx", 0, 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_16_32 },
{ UAE_FILTER_SUPEREAGLE, 0, "SuperEagle", "supereagle", 0, 0, UAE_FILTER_MODE_16_16, 0, 0 },
ymult = ahs * 1000 / dst_height;
else
ymult = ymult + ymult * currprefs.gfx_filter_vert_zoom / 2000;
-
+
+ if (currprefs.gfx_filter_horiz_zoom_mult <= 0 && currprefs.gfx_filter_vert_zoom_mult <= 0 && currprefs.gfx_filter_aspect) {
+ int mult = xmult > ymult ? xmult : ymult;
+ xmult = mult;
+ ymult = mult;
+ }
+
xs = dst_width - dst_width * xmult / 1000;
dr->left += xs / 2;
dr->right -= xs / 2;
void S2X_init (int dw, int dh, int aw, int ah, int mult, int ad, int dd)
{
int flags = 0;
+ int res_shift;
if (currprefs.leds_on_screen == STATUSLINE_BUILTIN)
changed_prefs.leds_on_screen = currprefs.leds_on_screen = STATUSLINE_TARGET;
changed_prefs.gfx_filter = usedfilter->type;
}
}
+
+ res_shift = RES_MAX - currprefs.gfx_resolution;
+ if (currprefs.gfx_xcenter_size > 0 && (currprefs.gfx_xcenter_size >> res_shift) < aw)
+ aw = currprefs.gfx_xcenter_size >> res_shift;
+ res_shift = currprefs.gfx_linedbl ? 0 : 1;
+ if (currprefs.gfx_ycenter_size > 0 && (currprefs.gfx_ycenter_size >> res_shift) < ah)
+ ah = currprefs.gfx_ycenter_size >> res_shift;
+
dst_width = dw;
dst_height = dh;
dst_depth = dd;
static uae_u8 scrlinebuf[4096 * 4]; /* this is too large, but let's rather play on the safe side here */
-static struct MultiDisplay *getdisplay (struct uae_prefs *p)
+struct MultiDisplay *getdisplay (struct uae_prefs *p)
{
int i;
int display = p->gfx_display;
if(!(currentmode->flags & (DM_DX_FULLSCREEN | DM_W_FULLSCREEN)))
OffsetRect(dr, amigawin_rect.left, amigawin_rect.top);
if (currentmode->flags & DM_W_FULLSCREEN) {
- if (currentmode->fullfill)
+ if (currentmode->fullfill && (currentmode->current_width > currentmode->native_width || currentmode->current_height > currentmode->native_height))
return;
OffsetRect (dr, (currentmode->native_width - currentmode->current_width) / 2,
(currentmode->native_height - currentmode->current_height) / 2);
: 0);
}
-
-static int set_ddraw (void)
+static int set_ddraw_2 (void)
{
HRESULT ddrval;
int bits = (currentmode->current_depth + 7) & ~7;
dd = (currentmode->flags & DM_DDRAW) ? TRUE : FALSE;
DirectDraw_FreeMainSurface ();
- ddrval = DirectDraw_SetCooperativeLevel (hAmigaWnd, dxfullscreen);
+ ddrval = DirectDraw_SetCooperativeLevel (hAmigaWnd, dxfullscreen, TRUE);
if (FAILED(ddrval))
goto oops;
if (dxfullscreen) {
- write_log ("set_ddraw: Trying %dx%d, bits=%d, refreshrate=%d\n", width, height, bits, freq);
- ddrval = DirectDraw_SetDisplayMode (width, height, bits, freq);
- if (FAILED(ddrval)) {
- write_log ("set_ddraw: failed, trying without forced refresh rate\n");
- ddrval = DirectDraw_SetDisplayMode (width, height, bits, 0);
- if (FAILED(ddrval))
- goto oops;
+ int rounds = 3;
+ for (;;) {
+ write_log ("set_ddraw: Trying %dx%d, bits=%d, refreshrate=%d\n", width, height, bits, freq);
+ ddrval = DirectDraw_SetDisplayMode (width, height, bits, freq);
+ if (SUCCEEDED (ddrval))
+ break;
+ if (ddrval != 0x80004001 && freq != 0) { // "The function called is not supported at this time" (wtf?)
+ write_log ("set_ddraw: failed, trying without forced refresh rate\n");
+ ddrval = DirectDraw_SetDisplayMode (width, height, bits, 0);
+ if (SUCCEEDED (ddrval))
+ break;
+ }
+ if (ddrval != DDERR_INVALIDMODE && ddrval != 0x80004001 && ddrval != DDERR_UNSUPPORTEDMODE)
+ goto oops;
+ return -1;
}
}
if (multi) {
int cnt = 1;
DirectDraw_EnumDisplays (displaysCallback);
- EnumDisplayMonitors(NULL, NULL, monitorEnumProc, (LPARAM)&cnt);
+ EnumDisplayMonitors (NULL, NULL, monitorEnumProc, (LPARAM)&cnt);
} else {
write_log ("Multimonitor detection disabled\n");
Displays[0].primary = 1;
AVIOutput_Restart ();
#endif
setmouseactive (0);
+#ifdef RETROPLATFORM
+ rp_set_hwnd (NULL);
+#endif
if (hStatusWnd) {
ShowWindow (hStatusWnd, SW_HIDE);
DestroyWindow (hStatusWnd);
ret = doInit ();
} while (ret < 0);
+ if (!ret) {
+ DirectDraw_Release ();
+ return ret;
+ }
+
setpriority(&priorities[currprefs.win32_active_priority]);
if (!rp_isactive ())
setmouseactive (-1);
c |= currprefs.gfx_filter_scanlines != changed_prefs.gfx_filter_scanlines ? (1|8) : 0;
c |= currprefs.gfx_filter_scanlinelevel != changed_prefs.gfx_filter_scanlinelevel ? (1|8) : 0;
c |= currprefs.gfx_filter_scanlineratio != changed_prefs.gfx_filter_scanlineratio ? (1|8) : 0;
- c |= currprefs.gfx_filter_upscale != changed_prefs.gfx_filter_upscale ? (1|8) : 0;
+ c |= currprefs.gfx_filter_aspect != changed_prefs.gfx_filter_aspect ? (1|8) : 0;
c |= currprefs.gfx_filter_luminance != changed_prefs.gfx_filter_luminance ? (1|8) : 0;
c |= currprefs.gfx_filter_contrast != changed_prefs.gfx_filter_contrast ? (1|8) : 0;
c |= currprefs.gfx_filter_saturation != changed_prefs.gfx_filter_saturation ? (1|8) : 0;
currprefs.gfx_filter_scanlines = changed_prefs.gfx_filter_scanlines;
currprefs.gfx_filter_scanlinelevel = changed_prefs.gfx_filter_scanlinelevel;
currprefs.gfx_filter_scanlineratio = changed_prefs.gfx_filter_scanlineratio;
- currprefs.gfx_filter_upscale = changed_prefs.gfx_filter_upscale;
+ currprefs.gfx_filter_aspect = changed_prefs.gfx_filter_aspect;
currprefs.gfx_filter_luminance = changed_prefs.gfx_filter_luminance;
currprefs.gfx_filter_contrast = changed_prefs.gfx_filter_contrast;
currprefs.gfx_filter_saturation = changed_prefs.gfx_filter_saturation;
full = 1;
if (changed_prefs.gfx_pfullscreen != currprefs.gfx_pfullscreen && screen_is_picasso)
full = 1;
- if (!screen_is_picasso && changed_prefs.gfx_afullscreen) {
+ /* fullscreen to fullscreen? */
+ if (!screen_is_picasso && changed_prefs.gfx_afullscreen && currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen) {
if (currprefs.gfx_size_fs.width != changed_prefs.gfx_size_fs.width ||
currprefs.gfx_size_fs.height != changed_prefs.gfx_size_fs.height) {
quick = 1;
if (picasso96_state.Width != wc->current_width ||
picasso96_state.Height != wc->current_height)
return -1;
+ return 1;
} else {
if (currentmode->current_width != wc->current_width ||
currentmode->current_height != wc->current_height ||
#endif
free (gfxvidinfo.realbufmem);
gfxvidinfo.realbufmem = 0;
- DirectDraw_Release();
- close_hwnds();
+ DirectDraw_Release ();
+ close_hwnds ();
}
void WIN32GFX_ToggleFullScreen (void)
}
#endif
-static int create_windows (void)
+static int getbestmode (int nextbest)
+{
+ int i, disp;
+
+ disp = currprefs.gfx_display;
+ for (i = 0; DisplayModes[i].depth >= 0; i++) {
+ struct PicassoResolution *pr = &DisplayModes[i];
+ if (pr->res.width == currentmode->native_width && pr->res.height == currentmode->native_height)
+ break;
+ }
+ if (DisplayModes[i].depth >= 0) {
+ if (!nextbest)
+ return 1;
+ while (DisplayModes[i].res.width == currentmode->native_width && DisplayModes[i].res.height == currentmode->native_height)
+ i++;
+ } else {
+ i = 0;
+ }
+ for (; DisplayModes[i].depth >= 0; i++) {
+ struct PicassoResolution *pr = &DisplayModes[i];
+ if (pr->res.width >= currentmode->native_width && pr->res.height >= currentmode->native_height) {
+ write_log ("FS: %dx%d -> %dx%d\n", currentmode->native_width, currentmode->native_height,
+ pr->res.width, pr->res.height);
+ currentmode->native_width = pr->res.width;
+ currentmode->native_height = pr->res.height;
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int create_windows_2 (void)
{
int dxfs = currentmode->flags & (DM_DX_FULLSCREEN | DM_D3D_FULLSCREEN);
int fsw = currentmode->flags & (DM_W_FULLSCREEN);
}
} else {
- int i;
-
- for (i = 0; DisplayModes[i].depth >= 0; i++) {
- struct PicassoResolution *pr = &DisplayModes[i];
- if (pr->res.width == currentmode->native_width && pr->res.height == currentmode->native_height)
- break;
- }
- if (DisplayModes[i].depth < 0) {
- for (i = 0; DisplayModes[i].depth >= 0; i++) {
- struct PicassoResolution *pr = &DisplayModes[i];
- if (pr->res.width >= currentmode->native_width && pr->res.height >= currentmode->native_height) {
- write_log ("FS: %dx%d -> %dx%d\n", currentmode->native_width, currentmode->native_height,
- pr->res.width, pr->res.height);
- currentmode->native_width = pr->res.width;
- currentmode->native_height = pr->res.height;
- break;
- }
- }
- }
-
+ getbestmode (0);
}
if (rp_isactive ()) {
}
ShowWindow (hAmigaWnd, SW_SHOWNORMAL);
UpdateWindow (hAmigaWnd);
+
+ return 1;
+}
+
+static int set_ddraw (void)
+{
+ int cnt, ret;
+
+ if (picasso_on)
+ currentmode->pal = (LPPALETTEENTRY) & picasso96_state.CLUT;
+ else
+ currentmode->pal = colors256;
+
+ cnt = 3;
+ for (;;) {
+ ret = set_ddraw_2 ();
+ if (cnt-- <= 0)
+ return 0;
+ if (ret < 0) {
+ getbestmode (1);
+ continue;
+ }
+ if (ret == 0)
+ return 0;
+ break;
+ }
return 1;
}
+static int create_windows (void)
+{
+ if (!create_windows_2 ())
+ return 0;
+ return set_ddraw ();
+}
+
static void updatemodes (void)
{
DWORD flags;
updatemodes ();
currentmode->native_depth = 0;
tmp_depth = currentmode->current_depth;
- currentmode->native_width = currentmode->current_width;
+
+ currentmode->native_width = currentmode->current_width;
currentmode->native_height = currentmode->current_height;
+ if (currentmode->flags & DM_W_FULLSCREEN) {
+ RECT rc = getdisplay (&currprefs)->rect;
+ currentmode->native_width = rc.right - rc.left;
+ currentmode->native_height = rc.bottom - rc.top;
+ }
write_log ("W=%d H=%d B=%d CT=%d\n",
DirectDraw_CurrentWidth (), DirectDraw_CurrentHeight (), DirectDraw_GetCurrentDepth (), colortype);
goto oops;
#ifdef PICASSO96
if (screen_is_picasso) {
- currentmode->pal = (LPPALETTEENTRY) & picasso96_state.CLUT;
- if (!set_ddraw ()) {
- goto oops;
- }
picasso_vidinfo.rowbytes = DirectDraw_GetSurfacePitch();
picasso_vidinfo.pixbytes = DirectDraw_GetBytesPerPixel();
picasso_vidinfo.rgbformat = DirectDraw_GetPixelFormat();
break;
} else {
#endif
- currentmode->pal = colors256;
- if (! set_ddraw ()) {
- goto oops;
- }
currentmode->native_depth = currentmode->current_depth;
#if defined (GFXFILTER)
if (currentmode->flags & (DM_OPENGL | DM_D3D | DM_SWSCALE)) {
void DX_Fill (int dstx, int dsty, int width, int height, uae_u32 color);
void DX_Blit (int x, int y, int w, int h);
void centerdstrect (RECT *);
-
+struct MultiDisplay *getdisplay (struct uae_prefs *p);
#endif
*
***************************************************************************/
+#define CONFIGCACHE 1
#define FRONTEND 0
#define _WIN32_WINNT 0x600
write_log ("FlipToGDISurface failed, %s\n", DXError (hr));
}
+ flush_log ();
+
if (shortcut == -1) {
int ret;
ret = GetSettings (0, hAmigaWnd);
return config;
}
+static void FreeConfigStore (void)
+{
+ int i;
+ for (i = 0; i < configstoresize; i++)
+ FreeConfigStruct (configstore[i]);
+ free (configstore);
+ configstore = 0;
+ configstoresize = configstoreallocated = 0;
+}
+
+static void getconfigcache (char *dst, const char *path)
+{
+ strcpy (dst, path);
+ strncat (dst, "configuration.cache", MAX_DPATH);
+}
+
+static char *fgetsx (char *dst, FILE *f)
+{
+ char *s = fgets (dst, MAX_DPATH, f);
+ if (!s)
+ return s;
+ if (strlen (dst) == 0)
+ return s;
+ if (dst[strlen (dst) - 1] == '\n')
+ dst[strlen (dst) - 1] = 0;
+ if (dst[strlen (dst) - 1] == '\r')
+ dst[strlen (dst) - 1] = 0;
+ return s;
+}
+
+static char configcachever[] = "0.1";
+
+static struct ConfigStruct *readconfigcache (const char *path)
+{
+ FILE *zcache;
+ char cachepath[MAX_DPATH];
+ char buf[MAX_DPATH];
+ char rootpath[MAX_DPATH];
+ char path2[MAX_DPATH];
+ struct ConfigStruct *cs, *first;
+ int err, i;
+
+ err = 0;
+ first = NULL;
+ getconfigcache (cachepath, path);
+ zcache = fopen (cachepath, "r");
+ if (!zcache)
+ return NULL;
+ fgetsx (buf, zcache);
+ if (!feof (zcache) && !strcmp (buf, configcachever)) {
+ GetFullPathName (path, sizeof path2, path2, NULL);
+ strcpy (rootpath, path2);
+ fgetsx (buf, zcache);
+ if (!strcmp (buf, rootpath)) {
+ fgetsx (buf, zcache);
+ if (!feof (zcache) && strlen (buf) == 0) {
+ while (fgetsx (buf, zcache)) {
+ cs = AllocConfigStruct ();
+ if (configstore == NULL || configstoreallocated == configstoresize) {
+ configstoreallocated += 100;
+ configstore = realloc (configstore, sizeof (struct ConfigStruct*) * configstoreallocated);
+ }
+ configstore[configstoresize++] = cs;
+ if (!first)
+ first = cs;
+ if (buf[0] == '1')
+ cs->Directory = 1;
+
+ fgetsx (buf, zcache);
+ if (strlen (buf) > strlen (rootpath)) {
+ for (i = 0; i < configstoresize; i++) {
+ GetFullPathName (configstore[i]->Fullpath, sizeof path2, path2, NULL);
+ if (!strcmp (path2, buf) && strcmp (path2, rootpath)) {
+ cs->Parent = configstore[i];
+ break;
+ }
+ }
+ }
+
+ fgetsx (cs->Name, zcache);
+ fgetsx (cs->Path, zcache);
+ fgetsx (cs->Fullpath, zcache);
+ fgetsx (cs->Description, zcache);
+ fgetsx (cs->HardwareLink, zcache);
+ fgetsx (cs->HostLink, zcache);
+ fgetsx (buf, zcache);
+ cs->Type = 3;
+
+ fgetsx (buf, zcache);
+ if (strlen (buf) > 0)
+ break;
+ }
+ }
+ }
+ }
+ if (!feof (zcache))
+ err = 1;
+ fclose (zcache);
+ if (err || first == NULL) {
+ zcache = fopen (cachepath, "w+");
+ if (zcache)
+ fclose (zcache);
+ FreeConfigStore ();
+ return NULL;
+ }
+ return first;
+}
+
+static void writeconfigcache (const char *path)
+{
+ int i;
+ char lf = 10;
+ FILE *zcache;
+ char cachepath[MAX_DPATH];
+ char path2[MAX_DPATH];
+
+ getconfigcache (cachepath, path);
+ zcache = fopen (cachepath, "r");
+ if (!zcache)
+ return;
+ fclose (zcache);
+ zcache = fopen (cachepath, "w");
+ if (!zcache)
+ return;
+ GetFullPathName (path, sizeof path2, path2, NULL);
+ fwrite (configcachever, strlen (configcachever), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ fwrite (path2, strlen (path2), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ for (i = configstoresize - 1; i >= 0; i--) {
+ struct ConfigStruct *cs = configstore[i];
+ sprintf (path2, "%d", cs->Directory);
+ fwrite (path2, strlen (path2), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ GetFullPathName (cs->Fullpath, sizeof path2, path2, NULL);
+ fwrite (path2, strlen (path2), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ fwrite (cs->Name, strlen (cs->Name), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ fwrite (cs->Fullpath, strlen (cs->Fullpath), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ fwrite (cs->Path, strlen (cs->Path), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ fwrite (cs->Description, strlen (cs->Description), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ fwrite (cs->HardwareLink, strlen (cs->HardwareLink), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ fwrite (cs->HostLink, strlen (cs->HostLink), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+ sprintf (path2, "%d", cs->Type);
+ fwrite (path2, strlen (path2), 1, zcache);
+ fwrite (&lf, 1, 1, zcache);
+
+ fwrite (&lf, 1, 1, zcache);
+ }
+ fclose (zcache);
+}
+
static struct ConfigStruct *GetConfigs (struct ConfigStruct *configparent, int usedirs, int *level)
{
DWORD num_bytes = 0;
struct ConfigStruct *config, *first;
HANDLE handle;
+ if (*level == 0)
+ FreeConfigStore ();
first = NULL;
GetConfigPath (path, configparent, FALSE);
GetConfigPath (shortpath, configparent, TRUE);
strcpy (path2, path);
strncat (path2, "*.*", MAX_DPATH);
- handle = FindFirstFile(path2, &find_data );
+
+ if (*level == 0) {
+ first = readconfigcache (path);
+ if (first)
+ return first;
+ }
+
+ handle = FindFirstFile (path2, &find_data );
if (handle == INVALID_HANDLE_VALUE) {
#ifndef SINGLEFILE
// Either the directory has no .CFG files, or doesn't exist.
if (first == NULL)
first = config;
}
- if(FindNextFile (handle, &find_data) == 0) {
+ if (FindNextFile (handle, &find_data) == 0) {
FindClose(handle);
break;
}
}
+ if (*level == 0 && CONFIGCACHE)
+ writeconfigcache (path);
return first;
}
-static void FreeConfigStore (void)
-{
- int i;
- for (i = 0; i < configstoresize; i++)
- FreeConfigStruct (configstore[i]);
- free (configstore);
- configstore = 0;
- configstoresize = configstoreallocated = 0;
-}
static struct ConfigStruct *CreateConfigStore (struct ConfigStruct *oldconfig)
{
int level = 0, i;
strcpy (path, oldconfig->Path);
strcpy (name, oldconfig->Name);
}
- FreeConfigStore ();
GetConfigs (NULL, 1, &level);
if (oldconfig) {
for (i = 0; i < configstoresize; i++) {
ew (hDlg, IDC_FILTERXTRA, vv2);
ew (hDlg, IDC_FILTERDEFAULT, v);
ew (hDlg, IDC_FILTERFILTER, vv);
- ew (hDlg, IDC_FILTERUPSCALE, vv && !vv2);
+ ew (hDlg, IDC_FILTERASPECT, vv && !vv2);
ew (hDlg, IDC_FILTERAUTORES, vv && !vv2);
ew (hDlg, IDC_FILTERPRESETSAVE, filterpreset_builtin < 0);
&workprefs.gfx_xcenter, &workprefs.gfx_ycenter,
&workprefs.gfx_filter_luminance, &workprefs.gfx_filter_contrast, &workprefs.gfx_filter_saturation,
&workprefs.gfx_filter_gamma, &workprefs.gfx_filter_blur, &workprefs.gfx_filter_noise,
- &workprefs.gfx_filter_upscale,
+ &workprefs.gfx_filter_aspect,
NULL
};
struct uae_filter *uf;
UAEREG *fkey;
- CheckDlgButton(hDlg, IDC_FILTERUPSCALE, workprefs.gfx_filter_upscale);
+ CheckDlgButton(hDlg, IDC_FILTERASPECT, workprefs.gfx_filter_aspect);
CheckDlgButton(hDlg, IDC_FILTERAUTORES, workprefs.gfx_autoresolution);
SendDlgItemMessage(hDlg, IDC_FILTERHZ, TBM_SETRANGE, TRUE, MAKELONG (-999, +999));
switch (msg)
{
- case WM_INITDIALOG:
-#if WINUAEBETA == 0
- ShowWindow (GetDlgItem(hDlg, IDC_FILTERAUTORES), SW_HIDE);
-#endif
- pages[HW3D_ID] = hDlg;
- currentpage = HW3D_ID;
- enable_for_hw3ddlg (hDlg);
+ case WM_INITDIALOG:
+ #if WINUAEBETA == 0
+ ShowWindow (GetDlgItem(hDlg, IDC_FILTERAUTORES), SW_HIDE);
+ #endif
+ pages[HW3D_ID] = hDlg;
+ currentpage = HW3D_ID;
+ enable_for_hw3ddlg (hDlg);
- case WM_USER:
- if(recursive > 0)
- break;
- recursive++;
- enable_for_hw3ddlg( hDlg );
- values_to_hw3ddlg (hDlg);
- recursive--;
- return TRUE;
- case WM_COMMAND:
- if(recursive > 0)
- break;
- recursive++;
- switch (wParam)
- {
- case IDC_FILTERDEFAULT:
- currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = 0;
- currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = 0;
- currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = 0;
- currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = 0;
+ case WM_USER:
+ if(recursive > 0)
+ break;
+ recursive++;
+ enable_for_hw3ddlg( hDlg );
values_to_hw3ddlg (hDlg);
- updatedisplayarea ();
- WIN32GFX_WindowMove ();
- break;
- case IDC_FILTERPRESETLOAD:
- case IDC_FILTERPRESETSAVE:
- case IDC_FILTERPRESETDELETE:
- filter_preset (hDlg, wParam);
- break;
- case IDC_FILTERENABLE:
- filter_handle (hDlg);
- break;
- case IDC_FILTERAUTORES:
- workprefs.gfx_autoresolution = IsDlgButtonChecked (hDlg, IDC_FILTERAUTORES);
- break;
- case IDC_FILTERUPSCALE:
- currprefs.gfx_filter_upscale = workprefs.gfx_filter_upscale = IsDlgButtonChecked (hDlg, IDC_FILTERUPSCALE);
- updatedisplayarea ();
- WIN32GFX_WindowMove ();
- break;
- default:
- if (HIWORD (wParam) == CBN_SELCHANGE || HIWORD (wParam) == CBN_KILLFOCUS) {
- switch (LOWORD (wParam))
- {
- case IDC_FILTERXTRA:
- values_to_hw3ddlg (hDlg);
- break;
- case IDC_FILTERPRESETS:
- filter_preset (hDlg, LOWORD (wParam));
- break;
- case IDC_FILTERSLR:
- item = SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_GETCURSEL, 0, 0L);
- if (item != CB_ERR) {
- currprefs.gfx_filter_scanlineratio = workprefs.gfx_filter_scanlineratio = scanlineindexes[item];
+ recursive--;
+ return TRUE;
+ case WM_COMMAND:
+ if(recursive > 0)
+ break;
+ recursive++;
+ switch (wParam)
+ {
+ case IDC_FILTERDEFAULT:
+ currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = 0;
+ currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = 0;
+ currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = 0;
+ currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = 0;
+ values_to_hw3ddlg (hDlg);
+ updatedisplayarea ();
+ WIN32GFX_WindowMove ();
+ break;
+ case IDC_FILTERPRESETLOAD:
+ case IDC_FILTERPRESETSAVE:
+ case IDC_FILTERPRESETDELETE:
+ filter_preset (hDlg, wParam);
+ break;
+ case IDC_FILTERENABLE:
+ filter_handle (hDlg);
+ break;
+ case IDC_FILTERAUTORES:
+ workprefs.gfx_autoresolution = IsDlgButtonChecked (hDlg, IDC_FILTERAUTORES);
+ break;
+ case IDC_FILTERASPECT:
+ currprefs.gfx_filter_aspect = workprefs.gfx_filter_aspect = IsDlgButtonChecked (hDlg, IDC_FILTERASPECT);
+ updatedisplayarea ();
+ WIN32GFX_WindowMove ();
+ break;
+ default:
+ if (HIWORD (wParam) == CBN_SELCHANGE || HIWORD (wParam) == CBN_KILLFOCUS) {
+ switch (LOWORD (wParam))
+ {
+ case IDC_FILTERXTRA:
+ values_to_hw3ddlg (hDlg);
+ break;
+ case IDC_FILTERPRESETS:
+ filter_preset (hDlg, LOWORD (wParam));
+ break;
+ case IDC_FILTERSLR:
+ item = SendDlgItemMessage (hDlg, IDC_FILTERSLR, CB_GETCURSEL, 0, 0L);
+ if (item != CB_ERR) {
+ currprefs.gfx_filter_scanlineratio = workprefs.gfx_filter_scanlineratio = scanlineindexes[item];
+ updatedisplayarea ();
+ }
+ break;
+ case IDC_FILTERMODE:
+ case IDC_FILTERFILTER:
+ filter_handle (hDlg);
+ break;
+ case IDC_FILTERHZMULT:
+ currprefs.gfx_filter_horiz_zoom_mult = workprefs.gfx_filter_horiz_zoom_mult = getfiltermult(hDlg, IDC_FILTERHZMULT);
+ updatedisplayarea ();
+ WIN32GFX_WindowMove ();
+ break;
+
+ case IDC_FILTERVZMULT:
+ currprefs.gfx_filter_vert_zoom_mult = workprefs.gfx_filter_vert_zoom_mult = getfiltermult(hDlg, IDC_FILTERVZMULT);
updatedisplayarea ();
+ WIN32GFX_WindowMove ();
+ break;
}
- break;
- case IDC_FILTERMODE:
- case IDC_FILTERFILTER:
- filter_handle (hDlg);
- break;
- case IDC_FILTERHZMULT:
- case IDC_FILTERVZMULT:
- currprefs.gfx_filter_horiz_zoom_mult = workprefs.gfx_filter_horiz_zoom_mult = getfiltermult(hDlg, IDC_FILTERHZMULT);
- currprefs.gfx_filter_vert_zoom_mult = workprefs.gfx_filter_vert_zoom_mult = getfiltermult(hDlg, IDC_FILTERVZMULT);
- updatedisplayarea ();
- WIN32GFX_WindowMove ();
- break;
}
+ break;
}
+ recursive--;
+ break;
+ case WM_HSCROLL:
+ {
+ HWND hz = GetDlgItem (hDlg, IDC_FILTERHZ);
+ HWND vz = GetDlgItem (hDlg, IDC_FILTERVZ);
+ HWND h = (HWND)lParam;
+
+ if (recursive)
+ break;
+ recursive++;
+ if (h == hz) {
+ currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = (int)SendMessage (hz, TBM_GETPOS, 0, 0);
+ if (workprefs.gfx_filter_aspect) {
+ currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = currprefs.gfx_filter_horiz_zoom;
+ SendDlgItemMessage (hDlg, IDC_FILTERVZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_vert_zoom);
+ }
+ } else if (h == vz) {
+ currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = (int)SendMessage (vz, TBM_GETPOS, 0, 0);
+ if (workprefs.gfx_filter_aspect) {
+ currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = currprefs.gfx_filter_vert_zoom;
+ SendDlgItemMessage (hDlg, IDC_FILTERHZ, TBM_SETPOS, TRUE, workprefs.gfx_filter_horiz_zoom);
+ }
+ } else {
+ currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERHO), TBM_GETPOS, 0, 0);
+ currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = (int)SendMessage (GetDlgItem (hDlg, IDC_FILTERVO), TBM_GETPOS, 0, 0);
+ }
+ if (filter_selected) {
+ int *pw = filter_selected->varw;
+ int *pc = filter_selected->varc;
+ int v = (int)SendMessage(GetDlgItem(hDlg, IDC_FILTERXL), TBM_GETPOS, 0, 0);
+ if (v < filter_selected->min)
+ v = filter_selected->min;
+ if (v > filter_selected->max)
+ v = filter_selected->max;
+ *pw = v;
+ *pc = v;
+ SetDlgItemInt (hDlg, IDC_FILTERXLV, v, TRUE);
+ }
+ SetDlgItemInt (hDlg, IDC_FILTERHZV, workprefs.gfx_filter_horiz_zoom, TRUE);
+ SetDlgItemInt (hDlg, IDC_FILTERVZV, workprefs.gfx_filter_vert_zoom, TRUE);
+ SetDlgItemInt (hDlg, IDC_FILTERHOV, workprefs.gfx_filter_horiz_offset, TRUE);
+ SetDlgItemInt (hDlg, IDC_FILTERVOV, workprefs.gfx_filter_vert_offset, TRUE);
+ init_colors();
+ notice_new_xcolors();
+ reset_drawing();
+ updatedisplayarea ();
+ WIN32GFX_WindowMove ();
+ recursive--;
break;
}
- recursive--;
- break;
- case WM_HSCROLL:
- currprefs.gfx_filter_horiz_zoom = workprefs.gfx_filter_horiz_zoom = (int)SendMessage(GetDlgItem(hDlg, IDC_FILTERHZ), TBM_GETPOS, 0, 0 );
- currprefs.gfx_filter_vert_zoom = workprefs.gfx_filter_vert_zoom = (int)SendMessage(GetDlgItem(hDlg, IDC_FILTERVZ), TBM_GETPOS, 0, 0 );
- currprefs.gfx_filter_horiz_offset = workprefs.gfx_filter_horiz_offset = (int)SendMessage(GetDlgItem(hDlg, IDC_FILTERHO), TBM_GETPOS, 0, 0);
- currprefs.gfx_filter_vert_offset = workprefs.gfx_filter_vert_offset = (int)SendMessage(GetDlgItem(hDlg, IDC_FILTERVO), TBM_GETPOS, 0, 0);
- if (filter_selected) {
- int *pw = filter_selected->varw;
- int *pc = filter_selected->varc;
- int v = (int)SendMessage(GetDlgItem(hDlg, IDC_FILTERXL), TBM_GETPOS, 0, 0);
- if (v < filter_selected->min)
- v = filter_selected->min;
- if (v > filter_selected->max)
- v = filter_selected->max;
- *pw = v;
- *pc = v;
- SetDlgItemInt (hDlg, IDC_FILTERXLV, v, TRUE);
- }
- SetDlgItemInt (hDlg, IDC_FILTERHZV, workprefs.gfx_filter_horiz_zoom, TRUE);
- SetDlgItemInt (hDlg, IDC_FILTERVZV, workprefs.gfx_filter_vert_zoom, TRUE);
- SetDlgItemInt (hDlg, IDC_FILTERHOV, workprefs.gfx_filter_horiz_offset, TRUE);
- SetDlgItemInt (hDlg, IDC_FILTERVOV, workprefs.gfx_filter_vert_offset, TRUE);
- init_colors();
- notice_new_xcolors();
- reset_drawing();
- updatedisplayarea ();
- WIN32GFX_WindowMove ();
- break;
}
return FALSE;
}
+Beta 13:
+
+- more screen mode switching problems fixed
+- automatically select next bigger resolution if fullscreen mode fails
+ to open (for example 50Hz-only modes without 50Hz compatible display)
+- added "keep aspect ratio" checkbox to filter panel, syncronizes
+ vertical and horizontal zoom sliders (OGL/D3D are still broken!)
+- both vertical and horizontal filter multiplier set to "FS" and aspect
+ ratio checkbox checked -> keep aspect ratio
+- midscreen BPLCON4 modifications fixed (broken since 1200b2, stupid bug,
+ wrong register address..) fixes Gloom (and other programs using same
+ copper C2P method) graphics problems
+- winuaeenforcer stack debug output fix (BR)
+- PCMCIA SRAM emulation eject crash fix
+- fullwindow Picasso96 mode is centered again
+
Beta 12:
- hardfile creation: sparse file option added (sparse file = non-written