static const TCHAR *maxvert[] = { L"nointerlace", L"interlace", 0 };
static const TCHAR *abspointers[] = { L"none", L"mousehack", L"tablet", 0 };
static const TCHAR *magiccursors[] = { L"both", L"native", L"host", 0 };
-static const TCHAR *autoscale[] = { L"none", L"scale", L"resize", L"center", 0 };
+static const TCHAR *autoscale[] = { L"none", L"standard", L"max", L"scale", L"resize", L"center", 0 };
static const TCHAR *joyportmodes[] = { L"", L"mouse", L"djoy", L"ajoy", L"cdtvjoy", L"cd32joy", L"lightpen", 0 };
static const TCHAR *joyaf[] = { L"none", L"normal", L"toggle", 0 };
static const TCHAR *epsonprinter[] = { L"none", L"ascii", L"epson_matrix_9pin", L"epson_matrix_24pin", L"epson_matrix_48pin", 0 };
#define INPREC_DISKREMOVE 5
#define INPREC_VSYNC 6
#define INPREC_CIAVSYNC 7
+#define INPREC_STATEFILE 0x7f
#define INPREC_END 0xff
#define INPREC_QUIT 0xfe
extern int input_recording;
extern void inprec_close (void);
-extern int inprec_open (TCHAR*, int);
+extern int inprec_open (const TCHAR*, int);
extern void inprec_rend (void);
extern void inprec_rstart (uae_u8);
extern void inprec_ru8 (uae_u8);
#define GFX_FULLSCREEN 1
#define GFX_FULLWINDOW 2
+#define AUTOSCALE_NONE 0
+#define AUTOSCALE_STATIC_NOMINAL 1
+#define AUTOSCALE_STATIC_MAX 2
+#define AUTOSCALE_NORMAL 3
+#define AUTOSCALE_RESIZE 4
+#define AUTOSCALE_CENTER 5
+
struct uae_prefs {
struct strlist *all_lines;
struct cdslot cdslots[MAX_TOTAL_SCSI_DEVICES];
TCHAR quitstatefile[MAX_DPATH];
TCHAR statefile[MAX_DPATH];
+ TCHAR inprecfile[MAX_DPATH];
+ int inprecmode;
TCHAR path_floppy[256];
TCHAR path_hardfile[256];
static signed long bouncy_cycles;
#define BOUNCY_CYCLES 30
-int inprec_open (TCHAR *fname, int record)
+int inprec_open (const TCHAR *fname, int record)
{
uae_u32 t = (uae_u32)time(0);
int i;
while (i-- > 0)
inprec_pu8 ();
inprec_p = inprec_plastptr;
+ if (inprec_pstart (INPREC_STATEFILE)) {
+ inprec_pstr (savestate_fname);
+ savestate_state = STATE_RESTORE;
+ inprec_pend ();
+ }
oldbuttons[0] = oldbuttons[1] = oldbuttons[2] = oldbuttons[3] = 0;
oldjoy[0] = oldjoy[1] = 0;
if (record < -1)
inprec_ru8 (UAESUBREV);
inprec_ru32 (t);
inprec_ru32 (0); // extra header size
+ if (savestate_state == STATE_DORESTORE) {
+ inprec_rstart (INPREC_STATEFILE);
+ inprec_rstr (savestate_fname);
+ inprec_rend ();
+ }
} else {
return 0;
}
return 1;
}
-void inprec_close(void)
+void inprec_close (void)
{
if (!inprec_zf)
return;
void inprec_rstr (const TCHAR *src)
{
char *s = ua (src);
+ char *ss = s;
while(*s) {
inprec_ru8 (*s);
s++;
}
inprec_ru8 (0);
- xfree (s);
+ xfree (ss);
}
void inprec_rstart (uae_u8 type)
{
inprec_ru8 (v);
inprec_rend ();
} else if (input_recording < 0) {
- while(inprec_pstart (INPREC_JOYBUTTON)) {
+ while (inprec_pstart (INPREC_JOYBUTTON)) {
uae_u8 j = inprec_pu8 ();
uae_u8 but = inprec_pu8 ();
uae_u8 vv = inprec_pu8 ();
fixup_prefs_dim2 (&prefs->gfx_size_win);
if (prefs->gfx_filter == 0 && prefs->gfx_filter_autoscale && !prefs->gfx_api)
prefs->gfx_filter = 1;
- if (prefs->gfx_filter_autoscale == 1 || prefs->gfx_filter_autoscale == 2) {
+ if (prefs->gfx_filter_autoscale == AUTOSCALE_RESIZE || prefs->gfx_filter_autoscale == AUTOSCALE_CENTER) {
prefs->gfx_filter_horiz_zoom_mult = 0;
prefs->gfx_filter_vert_zoom_mult = 0;
}
#include "ar.h"
#include "gayle.h"
#include "cia.h"
-
+#include "inputdevice.h"
#ifdef JIT
#include "jit/compemu.h"
#include <signal.h>
quit_program = 0;
hardboot = 0;
+
+ if (currprefs.inprecfile[0] && currprefs.inprecmode < 0) {
+ inprec_open (currprefs.inprecfile, currprefs.inprecmode);
+ changed_prefs.inprecmode = currprefs.inprecmode = 0;
+ changed_prefs.inprecfile[0] = currprefs.inprecfile[0] = 0;
+ }
+
#ifdef SAVESTATE
if (savestate_state == STATE_RESTORE)
restore_state (savestate_fname);
}
savestate_restore_finish ();
#endif
+ if (currprefs.inprecfile[0] && currprefs.inprecmode > 0) {
+ inprec_open (currprefs.inprecfile, currprefs.inprecmode);
+ changed_prefs.inprecmode = currprefs.inprecmode = 0;
+ changed_prefs.inprecfile[0] = currprefs.inprecfile[0] = 0;
+ }
+
fill_prefetch_slow ();
if (currprefs.produce_sound == 0)
eventtab[ev_audio].active = 0;
#define IDS_BUFFER_DOUBLE 363
#define IDS_BUFFER_TRIPLE 364
#define IDS_AUTOSCALE_CENTER 365
+#define IDS_AUTOSCALE_MAX 366
+#define IDS_AUTOSCALE_TV 367
#define IDS_QS_MODELS 1000
#define IDS_QS_MODEL_A500 1001
#define IDS_QS_MODEL_A500P 1002
#define IDC_DF2ENABLE 1776
#define IDC_FS_SELECT_EJECT 1776
#define IDC_FS_RW 1777
-#define IDC_FLOPPY_FFS2 1777
#define IDC_FLOPPY_BOOTABLE 1777
#define IDC_DF3ENABLE 1778
#define IDC_HDF_RW 1778
IDS_BUFFER_DOUBLE "Double buffering"\r
IDS_BUFFER_TRIPLE "Triple buffering"\r
IDS_AUTOSCALE_CENTER "Automatic center"\r
+ IDS_AUTOSCALE_MAX "Fullscreen (Max)"\r
+ IDS_AUTOSCALE_TV "Fullscreen (TV)"\r
END\r
\r
#endif // English resources\r
if (fs) {
if (smm == RP_SCREENMODE_XX) {
p->gfx_filter = rp_filter;
- p->gfx_filter_horiz_zoom_mult = 0;
- p->gfx_filter_vert_zoom_mult = 0;
- //p->gfx_filter_autoscale = 1;
+ p->gfx_filter_autoscale = AUTOSCALE_STATIC_NOMINAL;
} else {
int mult;
int prevmult = 1;
{
if (isfullscreen () != 0)
return 0;
- if (currprefs.gfx_filter_autoscale == 2)
+ if (currprefs.gfx_filter_autoscale == AUTOSCALE_RESIZE)
return 0;
if (!WIN32GFX_IsPicassoScreen ())
return 1;
_tcscat (out, L"Configurations\\");
if (!_tcscmp (name, L"StatefilePath"))
_tcscat (out, L"Savestates\\");
+ if (!_tcscmp (name, L"InputPath"))
+ _tcscat (out, L"Inputrecordings\\");
if (start_data >= 0)
regquerystr (NULL, name, out, &size);
if (GetFileAttributes (out) == INVALID_FILE_ATTRIBUTES)
#define WINUAEPUBLICBETA 1
#define LANG_DLL 1
-#define WINUAEBETA L"18"
-#define WINUAEDATE MAKEBD(2010, 9, 18)
-#define WINUAEEXTRA L"RC1"
+#define WINUAEBETA L"19"
+#define WINUAEDATE MAKEBD(2010, 9, 19)
+#define WINUAEEXTRA L"RC2"
#define WINUAEREV L""
#define IHF_WINDOWHIDDEN 6
filterxmult = 1000 / scale;
filterymult = 1000 / scale;
- cv = get_custom_limits (&cw, &ch, &cx, &cy);
+ if (currprefs.gfx_filter_autoscale == AUTOSCALE_STATIC_MAX || currprefs.gfx_filter_autoscale == AUTOSCALE_STATIC_NOMINAL) {
+ cw = (752 / 2) << currprefs.gfx_resolution;
+ ch = (572 / 2) << currprefs.gfx_vresolution;
+ cx = 0;
+ cy = 0;
+ cv = 1;
+ if (currprefs.gfx_filter_autoscale == AUTOSCALE_STATIC_NOMINAL) {
+ cw -= 80;
+ ch -= 50;
+ cx = 56;
+ cy = 20;
+ }
+ } else {
+ cv = get_custom_limits (&cw, &ch, &cx, &cy);
+ }
+
if (cv) {
int diff;
- if (currprefs.gfx_filter_autoscale == 3) {
+ if (currprefs.gfx_filter_autoscale == AUTOSCALE_CENTER) {
int ww = cw * scale;
int hh = ch * scale;
OffsetRect (zr, cx * scale - (dst_width - ww) / 2, cy * scale - (dst_height - hh) / 2);
goto cont;
- } else if (currprefs.gfx_filter_autoscale == 2 && isfullscreen () == 0 && !currprefs.gfx_filteroverlay[0]) {
+ } else if (currprefs.gfx_filter_autoscale == AUTOSCALE_RESIZE && isfullscreen () == 0 && !currprefs.gfx_filteroverlay[0]) {
static int lastresize = 0;
static int lastdelay = 1;
static int ocw, och, ocx, ocy, lcw, lch, lcx, lcy;
fullpath (workprefs.cartfile, MAX_DPATH);
break;
case IDC_INPREC_PLAY:
- inprec_open (full_path, ischecked (hDlg, IDC_INPREC_PLAYMODE) ? -1 : -2);
+ _tcscpy (workprefs.inprecfile, full_path);
+ workprefs.inprecmode = ischecked (hDlg, IDC_INPREC_PLAYMODE) ? -1 : -2;
break;
case IDC_INPREC_RECORD:
- inprec_open (full_path, 1);
+ _tcscpy (workprefs.inprecfile, full_path);
+ workprefs.inprecmode = 1;
break;
}
if (!nosavepath || 1) {
{
int v = workprefs.gfx_filter ? TRUE : FALSE;
int vv = FALSE, vv2 = FALSE, vv3 = FALSE;
- int as = workprefs.gfx_filter_autoscale == 2;
+ int as = workprefs.gfx_filter_autoscale == AUTOSCALE_CENTER;
struct uae_filter *uf;
int i, isfilter;
SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_RESETCONTENT, 0, 0L);
WIN32GUI_LoadUIString (IDS_AUTOSCALE_DISABLED, txt, sizeof (txt) / sizeof (TCHAR));
SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
+ WIN32GUI_LoadUIString (IDS_AUTOSCALE_TV, txt, sizeof (txt) / sizeof (TCHAR));
+ SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
+ WIN32GUI_LoadUIString (IDS_AUTOSCALE_MAX, txt, sizeof (txt) / sizeof (TCHAR));
+ SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
WIN32GUI_LoadUIString (IDS_AUTOSCALE_SCALING, txt, sizeof (txt) / sizeof (TCHAR));
SendDlgItemMessage (hDlg, IDC_FILTERAUTOSCALE, CB_ADDSTRING, 0, (LPARAM)txt);
WIN32GUI_LoadUIString (IDS_AUTOSCALE_RESIZE, txt, sizeof (txt) / sizeof (TCHAR));
+- rar archives crashed if file was already open (due to design flaw, it was possible to
+ open archives even if requested mode was read-write)
+- added "fullscreen (max)" and "fullscreen (tv)" (approximate only) to "autoscale" select
+ menu, basically replaces old "FS" filter multiplier
+
Beta 18 (RC1):
- F13/F14/F15 rawinput keycodes fixed (at least available on some apple usb keyboards)
ZFD_ADF, ZFD_ADF, ZFD_ADF, ZFD_ARCHIVE
};
-int iszip (struct zfile *z)
+int iszip (struct zfile *z, int mask)
{
TCHAR *name = z->name;
TCHAR *ext = _tcsrchr (name, '.');
uae_u8 header[32];
int i;
- int mask = ZFD_NORMAL;//z->zfdmask;
if (!ext)
return 0;
#endif
return 0;
}
+int iszip (struct zfile *z)
+{
+ return iszip (z, ZFD_NORMAL);
+}
struct zfile *zuncompress (struct znode *parent, struct zfile *z, int dodefault, int mask, int *retcode, int index)
{
return 0;
}
+static bool writeneeded (const TCHAR *mode)
+{
+ return _tcschr (mode, 'w') || _tcschr (mode, 'a') || _tcschr (mode, '+') || _tcschr (mode, 't');
+}
+
static struct zfile *zfile_fopen_2 (const TCHAR *name, const TCHAR *mode, int mask)
{
struct zfile *l;
#endif
l = openzip (name);
if (l) {
- if (_tcsicmp (mode, L"rb") && _tcsicmp (mode, L"r")) {
+ if (writeneeded (mode)) {
zfile_fclose (l);
return 0;
}
if (stat (l->name, &st) != -1)
l->size = st.st_size;
l->f = f;
+ if (writeneeded (mode) && iszip (l, ZFD_ARCHIVE)) {
+ zfile_fclose (l);
+ return NULL;
+ }
}
return l;
}
return 1;
}
-
/*
* fopen() for a compressed file
*/
l = zfile_fopen_2 (path, mode, mask);
if (!l)
return 0;
- if (_tcschr (mode, 'w') || _tcschr (mode, 'a'))
+ if (writeneeded (mode))
return l;
l2 = NULL;
while (cnt-- > 0) {
rc->OpenArchiveData.OpenMode = RAR_OM_LIST;
rc->hArcData = pRAROpenArchiveEx (&rc->OpenArchiveData);
if (rc->OpenArchiveData.OpenResult != 0) {
- xfree (rc);
zfile_fclose_archive (zv);
return archive_directory_arcacc (z, ArchiveFormatRAR);
}