mirror of
https://github.com/LIV2/WinUAE.git
synced 2025-12-06 00:12:52 +00:00
2400b10
This commit is contained in:
parent
63682b1497
commit
e9cc5580ad
@ -1183,7 +1183,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
|
||||
{
|
||||
struct socketbase *sb = get_socketbase (context);
|
||||
uae_u32 tagptr = m68k_areg (regs, 0);
|
||||
uae_u32 tagsprocessed = 1;
|
||||
uae_u32 tagsprocessed = 0;
|
||||
uae_u32 currtag;
|
||||
uae_u32 currval;
|
||||
|
||||
@ -1194,39 +1194,52 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
|
||||
currval = get_long (tagptr + 4);
|
||||
tagsprocessed++;
|
||||
|
||||
switch (currtag) {
|
||||
case TAG_DONE:
|
||||
BSDTRACE ((L"TAG_DONE"));
|
||||
tagsprocessed = 0;
|
||||
goto done;
|
||||
case TAG_IGNORE:
|
||||
BSDTRACE ((L"TAG_IGNORE"));
|
||||
break;
|
||||
case TAG_MORE:
|
||||
BSDTRACE ((L"TAG_MORE(0x%lx)", currval));
|
||||
tagptr = currval;
|
||||
break;
|
||||
case TAG_SKIP:
|
||||
BSDTRACE ((L"TAG_SKIP(%d)", currval));
|
||||
tagptr += currval * 8;
|
||||
break;
|
||||
if (!(currtag & TAG_USER)) {
|
||||
|
||||
default:
|
||||
if (currtag & TAG_USER) {
|
||||
BSDTRACE ((L"SBTM_"));
|
||||
BSDTRACE ((currtag & 0x0001 ? L"SET" : L"GET"));
|
||||
BSDTRACE ((currtag & 0x8000 ? L"REF(" : L"VAL("));
|
||||
switch (currtag)
|
||||
{
|
||||
case TAG_DONE:
|
||||
BSDTRACE ((L"TAG_DONE"));
|
||||
tagsprocessed = 0;
|
||||
goto done;
|
||||
case TAG_IGNORE:
|
||||
BSDTRACE ((L"TAG_IGNORE"));
|
||||
break;
|
||||
case TAG_MORE:
|
||||
BSDTRACE ((L"TAG_MORE(0x%lx)", currval));
|
||||
tagptr = currval;
|
||||
break;
|
||||
case TAG_SKIP:
|
||||
BSDTRACE ((L"TAG_SKIP(%d)", currval));
|
||||
tagptr += currval * 8;
|
||||
break;
|
||||
default:
|
||||
write_log (L"bsdsocket: WARNING: Unsupported tag type (%08x) in SocketBaseTagList(%x)\n",
|
||||
currtag, m68k_areg (regs, 0));
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch ((currtag >> 1) & SBTS_CODE) {
|
||||
} else {
|
||||
|
||||
BSDTRACE ((L"SBTM_"));
|
||||
BSDTRACE ((currtag & 0x0001 ? L"SET" : L"GET"));
|
||||
BSDTRACE ((currtag & 0x8000 ? L"REF(" : L"VAL("));
|
||||
|
||||
switch ((currtag >> 1) & SBTS_CODE)
|
||||
{
|
||||
case SBTC_BREAKMASK:
|
||||
BSDTRACE ((L"SBTC_BREAKMASK),0x%lx", currval));
|
||||
tagcopy (currtag, currval, tagptr, &sb->eintrsigs);
|
||||
break;
|
||||
case SBTC_SIGEVENTMASK:
|
||||
case SBTC_SIGIOMASK:
|
||||
BSDTRACE ((L"SBTC_SIGEVENTMASK),0x%lx", currval));
|
||||
tagcopy (currtag, currval, tagptr, &sb->eventsigs);
|
||||
break;
|
||||
case SBTC_SIGIOMASK:
|
||||
case SBTC_SIGURGMASK:
|
||||
BSDTRACE ((L"SBTC_SIGURGMASK),0x%lx", currval));
|
||||
//tagcopy (currtag, currval, tagptr, &sb->eventsigs);
|
||||
break;
|
||||
case SBTC_SIGEVENTMASK:
|
||||
BSDTRACE ((L"SBTC_SIGEVENTMASK),0x%lx", currval));
|
||||
tagcopy (currtag, currval, tagptr, &sb->eventsigs);
|
||||
break;
|
||||
@ -1246,9 +1259,22 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
|
||||
put_long (tagptr + 4, sb->dtablesize);
|
||||
}
|
||||
break;
|
||||
#if 0
|
||||
case SBTC_FDCALLBACK:
|
||||
break;
|
||||
case SBTC_LOGSTAT:
|
||||
break;
|
||||
case SBTC_LOGTAGPTR:
|
||||
break;
|
||||
case SBTC_LOGFACILITY:
|
||||
break;
|
||||
case SBTC_LOGMASK:
|
||||
break;
|
||||
#endif
|
||||
case SBTC_ERRNOSTRPTR:
|
||||
if (currtag & 1) {
|
||||
BSDTRACE ((L"ERRNOSTRPTR),invalid"));
|
||||
goto done;
|
||||
} else {
|
||||
unsigned long ulTmp;
|
||||
if (currtag & 0x8000) { /* SBTM_GETREF */
|
||||
@ -1267,6 +1293,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
|
||||
case SBTC_HERRNOSTRPTR:
|
||||
if (currtag & 1) {
|
||||
BSDTRACE ((L"HERRNOSTRPTR),invalid"));
|
||||
goto done;
|
||||
} else {
|
||||
unsigned long ulTmp;
|
||||
if (currtag & 0x8000) { /* SBTM_GETREF */
|
||||
@ -1282,6 +1309,14 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
|
||||
}
|
||||
}
|
||||
break;
|
||||
#if 0
|
||||
case SBTC_IOERRNOSTRPTR:
|
||||
break;
|
||||
case SBTC_S2ERRNOSTRPTR:
|
||||
break;
|
||||
case SBTC_S2WERRNOSTRPTR:
|
||||
break;
|
||||
#endif
|
||||
case SBTC_ERRNOBYTEPTR:
|
||||
BSDTRACE ((L"SBTC_ERRNOBYTEPTR),0x%lx", currval));
|
||||
tagcopy (currtag, currval, tagptr, &sb->errnoptr);
|
||||
@ -1305,16 +1340,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
|
||||
default:
|
||||
write_log (L"bsdsocket: WARNING: Unsupported tag type (%08x) in SocketBaseTagList(%x)\n",
|
||||
currtag, m68k_areg (regs, 0));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
BSDTRACE ((L"TAG_UNKNOWN(0x%x)", currtag));
|
||||
/* Aminetradio uses 0x00004e55 as an ending tag */
|
||||
if ((currtag & 0xffff8000) == 0) {
|
||||
write_log (L"bsdsocket: WARNING: Corrupted SocketBaseTagList(%x) tag detected (%08x)\n",
|
||||
m68k_areg (regs, 0), currtag);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
48
cfgfile.cpp
48
cfgfile.cpp
@ -810,19 +810,19 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
|
||||
cfgfile_dwrite (f, L"gfx_autoresolution_min_vertical", vertmode[p->gfx_autoresolution_minv + 1]);
|
||||
cfgfile_dwrite (f, L"gfx_autoresolution_min_horizontal", horizmode[p->gfx_autoresolution_minh + 1]);
|
||||
|
||||
cfgfile_write (f, L"gfx_backbuffers", L"%d", p->gfx_backbuffers);
|
||||
cfgfile_write (f, L"gfx_backbuffers_rtg", L"%d", p->gfx_rtg_backbuffers);
|
||||
cfgfile_write_str (f, L"gfx_vsync", vsyncmodes[p->gfx_avsync]);
|
||||
cfgfile_write_str (f, L"gfx_vsyncmode", vsyncmodes2[p->gfx_avsyncmode]);
|
||||
cfgfile_write_str (f, L"gfx_vsync_picasso", vsyncmodes[p->gfx_pvsync]);
|
||||
cfgfile_write_str (f, L"gfx_vsyncmode_picasso", vsyncmodes2[p->gfx_pvsyncmode]);
|
||||
cfgfile_write (f, L"gfx_backbuffers", L"%d", p->gfx_apmode[0].gfx_backbuffers);
|
||||
cfgfile_write (f, L"gfx_backbuffers_rtg", L"%d", p->gfx_apmode[1].gfx_backbuffers);
|
||||
cfgfile_write_str (f, L"gfx_vsync", vsyncmodes[p->gfx_apmode[0].gfx_vsync]);
|
||||
cfgfile_write_str (f, L"gfx_vsyncmode", vsyncmodes2[p->gfx_apmode[0].gfx_vsyncmode]);
|
||||
cfgfile_write_str (f, L"gfx_vsync_picasso", vsyncmodes[p->gfx_apmode[1].gfx_vsync]);
|
||||
cfgfile_write_str (f, L"gfx_vsyncmode_picasso", vsyncmodes2[p->gfx_apmode[1].gfx_vsyncmode]);
|
||||
cfgfile_write_bool (f, L"gfx_lores", p->gfx_resolution == 0);
|
||||
cfgfile_write_str (f, L"gfx_resolution", lorestype1[p->gfx_resolution]);
|
||||
cfgfile_write_str (f, L"gfx_lores_mode", loresmode[p->gfx_lores_mode]);
|
||||
cfgfile_write_bool (f, L"gfx_flickerfixer", p->gfx_scandoubler);
|
||||
cfgfile_write_str (f, L"gfx_linemode", linemode[p->gfx_vresolution * 2 + p->gfx_scanlines]);
|
||||
cfgfile_write_str (f, L"gfx_fullscreen_amiga", fullmodes[p->gfx_afullscreen]);
|
||||
cfgfile_write_str (f, L"gfx_fullscreen_picasso", fullmodes[p->gfx_pfullscreen]);
|
||||
cfgfile_write_str (f, L"gfx_fullscreen_amiga", fullmodes[p->gfx_apmode[0].gfx_fullscreen]);
|
||||
cfgfile_write_str (f, L"gfx_fullscreen_picasso", fullmodes[p->gfx_apmode[1].gfx_fullscreen]);
|
||||
cfgfile_write_str (f, L"gfx_center_horizontal", centermode1[p->gfx_xcenter]);
|
||||
cfgfile_write_str (f, L"gfx_center_vertical", centermode1[p->gfx_ycenter]);
|
||||
cfgfile_write_str (f, L"gfx_colour_mode", colormode1[p->color_mode]);
|
||||
@ -1476,8 +1476,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
|
||||
|| cfgfile_intval (option, value, L"gfx_height_fullscreen", &p->gfx_size_fs.height, 1)
|
||||
|| cfgfile_intval (option, value, L"gfx_refreshrate", &p->gfx_refreshrate, 1)
|
||||
|| cfgfile_yesno (option, value, L"gfx_autoresolution", &p->gfx_autoresolution)
|
||||
|| cfgfile_intval (option, value, L"gfx_backbuffers", &p->gfx_backbuffers, 1)
|
||||
|| cfgfile_intval (option, value, L"gfx_backbuffers_rtg", &p->gfx_rtg_backbuffers, 1)
|
||||
|| cfgfile_intval (option, value, L"gfx_backbuffers", &p->gfx_apmode[0].gfx_backbuffers, 1)
|
||||
|| cfgfile_intval (option, value, L"gfx_backbuffers_rtg", &p->gfx_apmode[1].gfx_backbuffers, 1)
|
||||
|
||||
|| cfgfile_intval (option, value, L"gfx_center_horizontal_position", &p->gfx_xcenter_pos, 1)
|
||||
|| cfgfile_intval (option, value, L"gfx_center_vertical_position", &p->gfx_ycenter_pos, 1)
|
||||
@ -1553,8 +1553,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
|
||||
|| cfgfile_strval (option, value, L"gfx_resolution", &p->gfx_resolution, lorestype1, 0)
|
||||
|| cfgfile_strval (option, value, L"gfx_lores", &p->gfx_resolution, lorestype2, 0)
|
||||
|| cfgfile_strval (option, value, L"gfx_lores_mode", &p->gfx_lores_mode, loresmode, 0)
|
||||
|| cfgfile_strval (option, value, L"gfx_fullscreen_amiga", &p->gfx_afullscreen, fullmodes, 0)
|
||||
|| cfgfile_strval (option, value, L"gfx_fullscreen_picasso", &p->gfx_pfullscreen, fullmodes, 0)
|
||||
|| cfgfile_strval (option, value, L"gfx_fullscreen_amiga", &p->gfx_apmode[0].gfx_fullscreen, fullmodes, 0)
|
||||
|| cfgfile_strval (option, value, L"gfx_fullscreen_picasso", &p->gfx_apmode[1].gfx_fullscreen, fullmodes, 0)
|
||||
|| cfgfile_strval (option, value, L"gfx_center_horizontal", &p->gfx_xcenter, centermode1, 1)
|
||||
|| cfgfile_strval (option, value, L"gfx_center_vertical", &p->gfx_ycenter, centermode1, 1)
|
||||
|| cfgfile_strval (option, value, L"gfx_center_horizontal", &p->gfx_xcenter, centermode2, 0)
|
||||
@ -1583,18 +1583,18 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
|
||||
return 1;
|
||||
}
|
||||
if (_tcscmp (option, L"gfx_vsync") == 0) {
|
||||
if (cfgfile_strval (option, value, L"gfx_vsync", &p->gfx_avsync, vsyncmodes, 0) >= 0)
|
||||
if (cfgfile_strval (option, value, L"gfx_vsync", &p->gfx_apmode[0].gfx_vsync, vsyncmodes, 0) >= 0)
|
||||
return 1;
|
||||
return cfgfile_yesno (option, value, L"gfx_vsync", &p->gfx_avsync);
|
||||
return cfgfile_yesno (option, value, L"gfx_vsync", &p->gfx_apmode[0].gfx_vsync);
|
||||
}
|
||||
if (_tcscmp (option, L"gfx_vsync_picasso") == 0) {
|
||||
if (cfgfile_strval (option, value, L"gfx_vsync_picasso", &p->gfx_pvsync, vsyncmodes, 0) >= 0)
|
||||
if (cfgfile_strval (option, value, L"gfx_vsync_picasso", &p->gfx_apmode[1].gfx_vsync, vsyncmodes, 0) >= 0)
|
||||
return 1;
|
||||
return cfgfile_yesno (option, value, L"gfx_vsync_picasso", &p->gfx_pvsync);
|
||||
return cfgfile_yesno (option, value, L"gfx_vsync_picasso", &p->gfx_apmode[1].gfx_vsync);
|
||||
}
|
||||
if (cfgfile_strval (option, value, L"gfx_vsyncmode", &p->gfx_avsyncmode, vsyncmodes2, 0))
|
||||
if (cfgfile_strval (option, value, L"gfx_vsyncmode", &p->gfx_apmode[0].gfx_vsyncmode, vsyncmodes2, 0))
|
||||
return 1;
|
||||
if (cfgfile_strval (option, value, L"gfx_vsyncmode_picasso", &p->gfx_pvsyncmode, vsyncmodes2, 0))
|
||||
if (cfgfile_strval (option, value, L"gfx_vsyncmode_picasso", &p->gfx_apmode[1].gfx_vsyncmode, vsyncmodes2, 0))
|
||||
return 1;
|
||||
|
||||
if (cfgfile_yesno (option, value, L"show_leds", &vb)) {
|
||||
@ -3097,8 +3097,8 @@ static void parse_gfx_specs (struct uae_prefs *p, const TCHAR *spec)
|
||||
p->gfx_scanlines = _tcschr (x2, 'D') != 0;
|
||||
if (p->gfx_scanlines)
|
||||
p->gfx_vresolution = VRES_DOUBLE;
|
||||
p->gfx_afullscreen = _tcschr (x2, 'a') != 0;
|
||||
p->gfx_pfullscreen = _tcschr (x2, 'p') != 0;
|
||||
p->gfx_apmode[0].gfx_fullscreen = _tcschr (x2, 'a') != 0;
|
||||
p->gfx_apmode[1].gfx_fullscreen = _tcschr (x2, 'p') != 0;
|
||||
|
||||
free (x0);
|
||||
return;
|
||||
@ -3955,8 +3955,8 @@ void default_prefs (struct uae_prefs *p, int type)
|
||||
}
|
||||
p->gfx_resolution = RES_HIRES;
|
||||
p->gfx_vresolution = VRES_DOUBLE;
|
||||
p->gfx_afullscreen = GFX_WINDOW;
|
||||
p->gfx_pfullscreen = GFX_WINDOW;
|
||||
p->gfx_apmode[0].gfx_fullscreen = GFX_WINDOW;
|
||||
p->gfx_apmode[1].gfx_fullscreen = GFX_WINDOW;
|
||||
p->gfx_xcenter = 0; p->gfx_ycenter = 0;
|
||||
p->gfx_xcenter_pos = -1;
|
||||
p->gfx_ycenter_pos = -1;
|
||||
@ -3968,8 +3968,8 @@ void default_prefs (struct uae_prefs *p, int type)
|
||||
p->gfx_autoresolution_minh = 0;
|
||||
p->color_mode = 2;
|
||||
p->gfx_blackerthanblack = 0;
|
||||
p->gfx_backbuffers = 1;
|
||||
p->gfx_rtg_backbuffers = 2;
|
||||
p->gfx_apmode[0].gfx_backbuffers = 1;
|
||||
p->gfx_apmode[1].gfx_backbuffers = 2;
|
||||
|
||||
p->immediate_blits = 0;
|
||||
p->waiting_blits = 0;
|
||||
|
||||
3
cia.cpp
3
cia.cpp
@ -319,7 +319,6 @@ static int CIA_update_check (void)
|
||||
ciaaicr |= 8; icr = 1;
|
||||
}
|
||||
if (bovfla) {
|
||||
//write_log (L"INT %x\n", M68K_GETPC);
|
||||
ciabicr |= 1; icr |= 2;
|
||||
ciabta = ciabla;
|
||||
if (ciabcra & 0x8) {
|
||||
@ -1365,7 +1364,7 @@ void dumpcia (void)
|
||||
console_out_f (L"TOD %06x (%06x) ALARM %06x %c%c CYC=%08X\n",
|
||||
ciaatod, ciaatol, ciaaalarm, ciaatlatch ? 'L' : ' ', ciaatodon ? ' ' : 'S', get_cycles ());
|
||||
console_out_f (L"B: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n",
|
||||
ciabcra, ciabcrb, ciaaicr, ciabimask, ciabta, ciabla, ciabtb, ciablb);
|
||||
ciabcra, ciabcrb, ciabicr, ciabimask, ciabta, ciabla, ciabtb, ciablb);
|
||||
console_out_f (L"TOD %06x (%06x) ALARM %06x %c%c CLK=%d\n",
|
||||
ciabtod, ciabtol, ciabalarm, ciabtlatch ? 'L' : ' ', ciabtodon ? ' ' : 'S', div10 / CYCLE_UNIT);
|
||||
}
|
||||
|
||||
18
custom.cpp
18
custom.cpp
@ -70,8 +70,8 @@
|
||||
STATIC_INLINE bool nocustom (void)
|
||||
{
|
||||
if (picasso_on && currprefs.picasso96_nocustom)
|
||||
return 1;
|
||||
return 0;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void uae_abort (const TCHAR *format,...)
|
||||
@ -2883,7 +2883,7 @@ void init_hz (bool fullinit)
|
||||
if (!picasso_on) {
|
||||
if (isvsync_chipset ()) {
|
||||
if (i == CHIPSET_REFRESH_PAL || i == CHIPSET_REFRESH_NTSC) {
|
||||
if ((abs (vblank_hz - 50) < 1 || abs (vblank_hz - 60) < 1) && currprefs.gfx_avsync == 2 && currprefs.gfx_afullscreen > 0) {
|
||||
if ((abs (vblank_hz - 50) < 1 || abs (vblank_hz - 60) < 1) && currprefs.gfx_apmode[0].gfx_vsync == 2 && currprefs.gfx_apmode[0].gfx_fullscreen > 0) {
|
||||
vsync_switchmode (vblank_hz > 55 ? 60 : 50);
|
||||
}
|
||||
}
|
||||
@ -3574,7 +3574,8 @@ void INTREQ_nodelay (uae_u16 v)
|
||||
void INTREQ_f (uae_u16 v)
|
||||
{
|
||||
if (use_eventmode (v)) {
|
||||
send_intreq_do (v);
|
||||
setclr (&intreq, v);
|
||||
send_intreq_do (intreq);
|
||||
} else {
|
||||
setclr (&intreq, v);
|
||||
setclr (&intreq_internal, v);
|
||||
@ -3589,15 +3590,18 @@ void INTREQ_0 (uae_u16 v)
|
||||
#endif
|
||||
|
||||
uae_u16 old = intreq;
|
||||
uae_u16 mask = v & 0x7fff;
|
||||
setclr (&intreq, v);
|
||||
|
||||
if (!(v & 0x8000) && old == intreq)
|
||||
return;
|
||||
|
||||
if (use_eventmode (v)) {
|
||||
// don't bother to waste time for interrupt queuing if nothing changes
|
||||
if (old == intreq && intreq_internal == intreq)
|
||||
return;
|
||||
event2_newevent_xx (-1, INT_PROCESSING_DELAY, intreq, send_intreq_do);
|
||||
} else {
|
||||
intreq_internal = intreq;
|
||||
if (intreq == old)
|
||||
return;
|
||||
if (v & 0x8000)
|
||||
doint ();
|
||||
}
|
||||
|
||||
12
drawing.cpp
12
drawing.cpp
@ -2310,9 +2310,9 @@ static void init_drawing_frame (void)
|
||||
frame_res_cnt--;
|
||||
if (frame_res_cnt == 0) {
|
||||
int m = frame_res * 2 + frame_res_lace;
|
||||
struct wh *dst = currprefs.gfx_afullscreen ? &changed_prefs.gfx_size_fs : &changed_prefs.gfx_size_win;
|
||||
struct wh *dst = currprefs.gfx_apmode[0].gfx_fullscreen ? &changed_prefs.gfx_size_fs : &changed_prefs.gfx_size_win;
|
||||
while (m < 6) {
|
||||
struct wh *src = currprefs.gfx_afullscreen ? &currprefs.gfx_size_fs_xtra[m] : &currprefs.gfx_size_win_xtra[m];
|
||||
struct wh *src = currprefs.gfx_apmode[0].gfx_fullscreen ? &currprefs.gfx_size_fs_xtra[m] : &currprefs.gfx_size_win_xtra[m];
|
||||
if ((src->width > 0 && src->height > 0) || (currprefs.gfx_api || currprefs.gfx_filter > 0)) {
|
||||
int nr = m >> 1;
|
||||
int nl = (m & 1) == 0 ? 0 : 1;
|
||||
@ -2928,18 +2928,18 @@ void drawing_init (void)
|
||||
|
||||
int isvsync_chipset (void)
|
||||
{
|
||||
if (picasso_on || !currprefs.gfx_avsync || (currprefs.gfx_avsync == 0 && !currprefs.gfx_afullscreen))
|
||||
if (picasso_on || !currprefs.gfx_apmode[0].gfx_vsync || (currprefs.gfx_apmode[0].gfx_vsync == 0 && !currprefs.gfx_apmode[0].gfx_fullscreen))
|
||||
return 0;
|
||||
if (currprefs.gfx_avsyncmode == 0)
|
||||
if (currprefs.gfx_apmode[0].gfx_vsyncmode == 0)
|
||||
return 1;
|
||||
return currprefs.m68k_speed < 0 ? -2 : -1;
|
||||
}
|
||||
|
||||
int isvsync_rtg (void)
|
||||
{
|
||||
if (!picasso_on || !currprefs.gfx_pvsync || (currprefs.gfx_pvsync == 0 && !currprefs.gfx_pfullscreen))
|
||||
if (!picasso_on || !currprefs.gfx_apmode[1].gfx_vsync || (currprefs.gfx_apmode[1].gfx_vsync == 0 && !currprefs.gfx_apmode[1].gfx_fullscreen))
|
||||
return 0;
|
||||
if (currprefs.gfx_pvsyncmode == 0)
|
||||
if (currprefs.gfx_apmode[1].gfx_vsyncmode == 0)
|
||||
return 1;
|
||||
return currprefs.m68k_speed < 0 ? -2 : -1;
|
||||
}
|
||||
|
||||
105
filesys.cpp
105
filesys.cpp
@ -5521,7 +5521,7 @@ static int legalrdbblock (UnitInfo *uip, int block)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int rl (uae_u8 *p)
|
||||
static uae_u32 rl (uae_u8 *p)
|
||||
{
|
||||
return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3]);
|
||||
}
|
||||
@ -5590,42 +5590,99 @@ static TCHAR *device_dupfix (uaecptr expbase, TCHAR *devname)
|
||||
return my_strdup (newname);
|
||||
}
|
||||
|
||||
static void dump_partinfo (struct hardfiledata *hfd, const uae_u8 *name, int num, uaecptr pp, int partblock)
|
||||
static void dump_partinfo (struct hardfiledata *hfd, uae_u8 *pp)
|
||||
{
|
||||
TCHAR *s = au ((char*)name);
|
||||
uae_u32 dostype = get_long (pp + 80);
|
||||
TCHAR *s;
|
||||
uae_u32 dostype;
|
||||
uae_u64 size;
|
||||
int blocksize, surfaces, spb, spt, reserved;
|
||||
int lowcyl, highcyl;
|
||||
uae_u32 block;
|
||||
uae_u8 buf[512];
|
||||
|
||||
size = ((uae_u64)get_long (pp + 20)) * 4 * get_long (pp + 28) * get_long (pp + 36) * (get_long (pp + 56) - get_long (pp + 52) + 1);
|
||||
blocksize = get_long (pp + 20) * 4;
|
||||
surfaces = get_long (pp + 28);
|
||||
spb = get_long (pp + 32);
|
||||
spt = get_long (pp + 36);
|
||||
reserved = get_long (pp + 40);
|
||||
lowcyl = get_long (pp + 52);
|
||||
highcyl = get_long (pp + 56);
|
||||
pp[37 + pp[36]] = 0;
|
||||
s = au ((char*)pp + 37);
|
||||
pp += 128;
|
||||
dostype = rl (pp + 64);
|
||||
size = ((uae_u64)rl (pp + 4)) * 4 * rl (pp + 12) * rl (pp + 20) * (rl (pp + 40) - rl (pp + 36) + 1);
|
||||
blocksize = rl (pp + 4) * 4;
|
||||
surfaces = rl (pp + 12);
|
||||
spb = rl (pp + 16);
|
||||
spt = rl (pp + 20);
|
||||
reserved = rl (pp + 24);
|
||||
lowcyl = rl (pp + 36);
|
||||
highcyl = rl (pp + 40);
|
||||
|
||||
write_log (L"RDB: '%s' dostype=%08X. PartBlock=%d\n", s, dostype, partblock);
|
||||
write_log (L"RDB: '%s' dostype=%08X\n", s, dostype);
|
||||
write_log (L"BlockSize: %d, Surfaces: %d, SectorsPerBlock %d\n",
|
||||
blocksize, surfaces, spb);
|
||||
write_log (L"SectorsPerTrack: %d, Reserved: %d, LowCyl %d, HighCyl %d, Size %dM\n",
|
||||
get_long (pp + 36), get_long (pp + 40), lowcyl, highcyl, (uae_u32)(size >> 20));
|
||||
write_log (L"Buffers: %d, BufMemType: %08x, MaxTransfer: %08x, BootPri: %d\n",
|
||||
get_long (pp + 60), get_long (pp + 64), get_long (pp + 68), get_long (pp + 76));
|
||||
spt, reserved, lowcyl, highcyl, (uae_u32)(size >> 20));
|
||||
write_log (L"Buffers: %d, BufMemType: %08x, MaxTransfer: %08x, Mask: %08x, BootPri: %d\n",
|
||||
rl (pp + 44), rl (pp + 48), rl (pp + 52), rl (pp + 56), rl (pp + 60));
|
||||
|
||||
block = lowcyl * surfaces * spt;
|
||||
if (hdf_read (hfd, buf, (uae_u64)blocksize * block, sizeof buf)) {
|
||||
write_log (L"First block %d dostype: %08X\n", block, (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3] << 0));
|
||||
write_log (L"First block %d dostype: %08X\n", block, rl (buf));
|
||||
} else {
|
||||
write_log (L"First block %d read failed!\n", block);
|
||||
}
|
||||
xfree (s);
|
||||
}
|
||||
|
||||
static void dump_rdb (UnitInfo *uip, struct hardfiledata *hfd, uae_u8 *bufrdb, uae_u8 *buf, int readblocksize)
|
||||
{
|
||||
write_log (L"RDB: HostID: %08x Flags: %08x\n",
|
||||
rl (bufrdb + 3 * 4), rl (bufrdb + 5 * 4));
|
||||
write_log (L"RDB: BL: %d BH: %d LC: %d HC: %d CB: %d HB: %d\n",
|
||||
rl (bufrdb + 128), rl (bufrdb + 132), rl (bufrdb + 136), rl (bufrdb + 140), rl (bufrdb + 144), rl (bufrdb + 152));
|
||||
for (int i = 0; i < 100; i++) {
|
||||
int partblock;
|
||||
if (i == 0)
|
||||
partblock = rl (bufrdb + 28);
|
||||
else
|
||||
partblock = rl (buf + 4 * 4);
|
||||
if (partblock == 0xffffffff)
|
||||
break;
|
||||
write_log (L"RDB: PART block %d:\n", partblock);
|
||||
if (!legalrdbblock (uip, partblock)) {
|
||||
write_log (L"RDB: corrupt PART pointer %d\n", partblock);
|
||||
break;
|
||||
}
|
||||
memset (buf, 0, readblocksize);
|
||||
hdf_read (hfd, buf, partblock * hfd->blocksize, readblocksize);
|
||||
if (!rdb_checksum ("PART", buf, partblock)) {
|
||||
write_log (L"RDB: checksum error PART block %d\n", partblock);
|
||||
break;
|
||||
}
|
||||
dump_partinfo (hfd, buf);
|
||||
}
|
||||
for (int i = 0; i < 100; i++) {
|
||||
int fileblock;
|
||||
if (i == 0)
|
||||
fileblock = rl (bufrdb + 32);
|
||||
else
|
||||
fileblock = rl (buf + 4 * 4);
|
||||
if (fileblock == 0xffffffff)
|
||||
break;
|
||||
write_log (L"RDB: FSEG block %d:\n", fileblock);
|
||||
if (!legalrdbblock (uip, fileblock)) {
|
||||
write_log (L"RDB: corrupt FSHD pointer %d\n", fileblock);
|
||||
break;
|
||||
}
|
||||
memset (buf, 0, readblocksize);
|
||||
hdf_read (hfd, buf, fileblock * hfd->blocksize, readblocksize);
|
||||
if (!rdb_checksum ("FSHD", buf, fileblock)) {
|
||||
write_log (L"RDB: checksum error FSHD block %d\n", fileblock);
|
||||
break;
|
||||
}
|
||||
uae_u32 dostype = rl (buf + 32);
|
||||
int version = (buf[36] << 8) | buf[37];
|
||||
int revision = (buf[38] << 8) | buf[39];
|
||||
write_log (L"LSEG: %08x (%d.%d)\n", dostype, version, revision);
|
||||
}
|
||||
}
|
||||
|
||||
#define rdbmnt write_log (L"Mounting uaehf.device %d (%d) (size=%I64u):\n", unit_no, partnum, hfd->virtsize);
|
||||
|
||||
static int rdb_mount (UnitInfo *uip, int unit_no, int partnum, uaecptr parmpacket)
|
||||
@ -5642,6 +5699,7 @@ static int rdb_mount (UnitInfo *uip, int unit_no, int partnum, uaecptr parmpacke
|
||||
int oldversion, oldrevision;
|
||||
int newversion, newrevision;
|
||||
TCHAR *s;
|
||||
bool showdebug = partnum == 0;
|
||||
|
||||
write_log (L"%s:\n", uip->rootdir);
|
||||
if (hfd->drive_empty) {
|
||||
@ -5700,12 +5758,16 @@ static int rdb_mount (UnitInfo *uip, int unit_no, int partnum, uaecptr parmpacke
|
||||
hfd->heads = rl (bufrdb + 72);
|
||||
fileblock = rl (bufrdb + 32);
|
||||
|
||||
if (partnum == 0) {
|
||||
write_log (L"RDB: RDSK detected at %d, FSHD=%d, C=%d S=%d H=%d\n",
|
||||
rdblock, fileblock, hfd->cylinders, hfd->sectors, hfd->heads);
|
||||
buf = xmalloc (uae_u8, readblocksize);
|
||||
|
||||
if (showdebug) {
|
||||
write_log (L"RDSK dump start\n");
|
||||
write_log (L"RDSK at %d, C=%d S=%d H=%d\n",
|
||||
rdblock, hfd->cylinders, hfd->sectors, hfd->heads);
|
||||
dump_rdb (uip, hfd, bufrdb, buf, readblocksize);
|
||||
write_log (L"RDSK dump end\n");
|
||||
}
|
||||
|
||||
buf = xmalloc (uae_u8, readblocksize);
|
||||
for (i = 0; i <= partnum; i++) {
|
||||
if (i == 0)
|
||||
partblock = rl (bufrdb + 28);
|
||||
@ -5744,7 +5806,6 @@ static int rdb_mount (UnitInfo *uip, int unit_no, int partnum, uaecptr parmpacke
|
||||
put_long (parmpacket + 12, 0); /* Device flags */
|
||||
for (i = 0; i < PP_MAXSIZE; i++)
|
||||
put_byte (parmpacket + 16 + i, buf[128 + i]);
|
||||
dump_partinfo (hfd, buf + 37, uip->devno, parmpacket, partblock);
|
||||
dostype = get_long (parmpacket + 80);
|
||||
|
||||
if (dostype == 0) {
|
||||
|
||||
@ -96,10 +96,8 @@ STATIC_INLINE void event2_newevent_xx (int no, evt t, uae_u32 data, evfunc2 func
|
||||
for (;;) {
|
||||
if (!eventtab2[no].active)
|
||||
break;
|
||||
if (eventtab2[no].evtime == et && eventtab2[no].handler == func) {
|
||||
eventtab2[no].handler (eventtab2[no].data);
|
||||
if (eventtab2[no].evtime == et && eventtab2[no].handler == func && eventtab2[no].data == data)
|
||||
break;
|
||||
}
|
||||
no++;
|
||||
if (no == ev2_max)
|
||||
no = ev2_misc;
|
||||
|
||||
@ -296,7 +296,7 @@ STATIC_INLINE int valid_address (uaecptr addr, uae_u32 size)
|
||||
return get_mem_bank (addr).check(addr, size);
|
||||
}
|
||||
|
||||
extern int addr_valid (TCHAR*, uaecptr,uae_u32);
|
||||
extern int addr_valid (const TCHAR*, uaecptr,uae_u32);
|
||||
|
||||
/* For faster access in custom chip emulation. */
|
||||
extern uae_u32 REGPARAM3 chipmem_lget (uaecptr) REGPARAM;
|
||||
|
||||
@ -165,6 +165,15 @@ struct chipset_refresh
|
||||
TCHAR commands[256];
|
||||
};
|
||||
|
||||
struct apmode
|
||||
{
|
||||
int gfx_fullscreen;
|
||||
int gfx_vsync;
|
||||
bool gfx_vflip;
|
||||
int gfx_vsyncmode;
|
||||
int gfx_backbuffers;
|
||||
};
|
||||
|
||||
struct uae_prefs {
|
||||
|
||||
struct strlist *all_lines;
|
||||
@ -243,21 +252,17 @@ struct uae_prefs {
|
||||
int gfx_autoresolution_minv, gfx_autoresolution_minh;
|
||||
bool gfx_scandoubler;
|
||||
int gfx_refreshrate;
|
||||
int gfx_avsync, gfx_pvsync;
|
||||
int gfx_avsyncmode, gfx_pvsyncmode;
|
||||
struct apmode gfx_apmode[2];
|
||||
int gfx_resolution;
|
||||
int gfx_vresolution;
|
||||
int gfx_lores_mode;
|
||||
int gfx_scanlines;
|
||||
int gfx_afullscreen, gfx_pfullscreen;
|
||||
int gfx_xcenter, gfx_ycenter;
|
||||
int gfx_xcenter_pos, gfx_ycenter_pos;
|
||||
int gfx_xcenter_size, gfx_ycenter_size;
|
||||
int gfx_max_horizontal, gfx_max_vertical;
|
||||
int gfx_saturation, gfx_luminance, gfx_contrast, gfx_gamma;
|
||||
bool gfx_blackerthanblack;
|
||||
int gfx_backbuffers;
|
||||
int gfx_rtg_backbuffers;
|
||||
int gfx_api;
|
||||
int color_mode;
|
||||
|
||||
|
||||
@ -4422,22 +4422,33 @@ static void matchdevices (struct inputdevice_functions *inf, struct uae_input_de
|
||||
int match = -1;
|
||||
for (j = 0; j < MAX_INPUT_DEVICES; j++) {
|
||||
if (aname2 && uid[j].configname) {
|
||||
bool matched = false;
|
||||
TCHAR bname[MAX_DPATH];
|
||||
TCHAR bname2[MAX_DPATH];
|
||||
TCHAR *p1 ,*p2;
|
||||
_tcscpy (bname, uid[j].configname);
|
||||
_tcscpy (bname2, aname2);
|
||||
p1 = _tcschr (bname, ' ');
|
||||
p2 = _tcschr (bname2, ' ');
|
||||
if (p1 && p2 && p1 - bname == p2 - bname2) {
|
||||
// strip possible local guid part
|
||||
p1 = _tcschr (bname, '{');
|
||||
p2 = _tcschr (bname2, '{');
|
||||
if (!p1 && !p2) {
|
||||
// check possible directinput names too
|
||||
p1 = _tcschr (bname, ' ');
|
||||
p2 = _tcschr (bname2, ' ');
|
||||
}
|
||||
if (!_tcscmp (bname, bname2)) {
|
||||
matched = true;
|
||||
} else if (p1 && p2 && p1 - bname == p2 - bname2) {
|
||||
*p1 = 0;
|
||||
*p2 = 0;
|
||||
if (bname && !_tcscmp (bname2, bname)) {
|
||||
if (match >= 0)
|
||||
match = -2;
|
||||
else
|
||||
match = j;
|
||||
}
|
||||
if (bname && !_tcscmp (bname2, bname))
|
||||
matched = true;
|
||||
}
|
||||
if (matched) {
|
||||
if (match >= 0)
|
||||
match = -2;
|
||||
else
|
||||
match = j;
|
||||
}
|
||||
if (match == -2)
|
||||
break;
|
||||
@ -4446,16 +4457,21 @@ static void matchdevices (struct inputdevice_functions *inf, struct uae_input_de
|
||||
// multiple matches -> use complete local-only id string for comparisons
|
||||
if (match == -2) {
|
||||
for (j = 0; j < MAX_INPUT_DEVICES; j++) {
|
||||
TCHAR *bname = uid[j].configname;
|
||||
if (aname2 && bname && !_tcscmp (aname2, bname))
|
||||
TCHAR *bname2 = uid[j].configname;
|
||||
if (aname2 && bname2 && !_tcscmp (aname2, bname2)) {
|
||||
match = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (match < 0) {
|
||||
// no match, try friend names
|
||||
for (j = 0; j < MAX_INPUT_DEVICES; j++) {
|
||||
TCHAR *bname = uid[j].name;
|
||||
if (aname2 && bname && !_tcscmp (aname2, bname))
|
||||
TCHAR *bname1 = uid[j].name;
|
||||
if (aname1 && bname1 && !_tcscmp (aname1, bname1)) {
|
||||
match = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (match >= 0) {
|
||||
|
||||
@ -155,7 +155,6 @@ DEFEVENT(KEY_F10,L"F10",AM_K,0,0,AK_F10)
|
||||
DEFEVENT(KEY_ESC,L"ESC",AM_K,0,0,AK_ESC)
|
||||
DEFEVENT(KEY_TAB,L"Tab",AM_K,0,0,AK_TAB)
|
||||
DEFEVENT(KEY_CTRL,L"CTRL",AM_K,0,0,AK_CTRL)
|
||||
DEFEVENT(KEY_CTRL_RIGHT,L"Right CTRL",AM_K,0,0,AK_RCTRL)
|
||||
DEFEVENT(KEY_CAPS_LOCK,L"Caps Lock",AM_K,0,0,AK_CAPSLOCK)
|
||||
DEFEVENT(KEY_SHIFT_LEFT,L"Left Shift",AM_K,0,0,AK_LSH)
|
||||
DEFEVENT(KEY_ALT_LEFT,L"Left Alt",AM_K,0,0,AK_LALT)
|
||||
|
||||
@ -67,12 +67,12 @@ int record_key_direct (int kc)
|
||||
write_log (L"Keyboard buffer overrun. Congratulations.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if ((kc >> 1) == AK_RCTRL) {
|
||||
kc ^= AK_RCTRL << 1;
|
||||
kc ^= AK_CTRL << 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
keybuf[kpb_first] = kc;
|
||||
kpb_first = kpb_next;
|
||||
return 1;
|
||||
|
||||
16
main.cpp
16
main.cpp
@ -133,10 +133,18 @@ void fixup_prefs_dimensions (struct uae_prefs *prefs)
|
||||
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_pvsync)
|
||||
prefs->gfx_pvsyncmode = 1;
|
||||
if (prefs->gfx_avsync && !prefs->gfx_avsyncmode && prefs->gfx_backbuffers < 2)
|
||||
prefs->gfx_backbuffers = 2;
|
||||
if (prefs->gfx_apmode[1].gfx_vsync)
|
||||
prefs->gfx_apmode[1].gfx_vsyncmode = 1;
|
||||
if (prefs->gfx_apmode[0].gfx_vsync && !prefs->gfx_apmode[0].gfx_vsyncmode && prefs->gfx_apmode[0].gfx_backbuffers < 1)
|
||||
prefs->gfx_apmode[0].gfx_backbuffers = 1;
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
struct apmode *ap = &prefs->gfx_apmode[i];
|
||||
ap->gfx_vflip = false;
|
||||
if (ap->gfx_backbuffers >= 2 || (ap->gfx_backbuffers >= 2 && ap->gfx_vsync && ap->gfx_vsyncmode) || (ap->gfx_backbuffers >= 1 && ap->gfx_vsync && !ap->gfx_vsyncmode))
|
||||
ap->gfx_vflip = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void fixup_cpu (struct uae_prefs *p)
|
||||
|
||||
@ -121,7 +121,7 @@ __inline__ void byteput (uaecptr addr, uae_u32 b)
|
||||
}
|
||||
#endif
|
||||
|
||||
int addr_valid (TCHAR *txt, uaecptr addr, uae_u32 len)
|
||||
int addr_valid (const TCHAR *txt, uaecptr addr, uae_u32 len)
|
||||
{
|
||||
addrbank *ab = &get_mem_bank(addr);
|
||||
if (ab == 0 || !(ab->flags & (ABFLAG_RAM | ABFLAG_ROM)) || addr < 0x100 || len < 0 || len > 16777215 || !valid_address (addr, len)) {
|
||||
|
||||
@ -2426,6 +2426,8 @@ void REGPARAM2 Exception (int nr)
|
||||
|
||||
STATIC_INLINE void do_interrupt (int nr)
|
||||
{
|
||||
static int cnt;
|
||||
|
||||
if (debug_dma)
|
||||
record_dma_event (DMA_EVENT_CPUIRQ, current_hpos (), vpos);
|
||||
|
||||
|
||||
@ -590,7 +590,7 @@ int host_socket(SB, int af, int type, int protocol)
|
||||
SOCKET s;
|
||||
unsigned long nonblocking = 1;
|
||||
|
||||
BSDTRACE((L"socket(%s,%s,%d) -> ",af == AF_INET ? "AF_INET" : "AF_other",type == SOCK_STREAM ? "SOCK_STREAM" : type == SOCK_DGRAM ? "SOCK_DGRAM " : "SOCK_RAW",protocol));
|
||||
BSDTRACE((L"socket(%s,%s,%d) -> ",af == AF_INET ? L"AF_INET" : L"AF_other",type == SOCK_STREAM ? L"SOCK_STREAM" : type == SOCK_DGRAM ? L"SOCK_DGRAM " : L"SOCK_RAW",protocol));
|
||||
|
||||
if ((s = socket(af,type,protocol)) == INVALID_SOCKET) {
|
||||
SETERRNO;
|
||||
@ -628,7 +628,7 @@ uae_u32 host_bind(SB, uae_u32 sd, uae_u32 name, uae_u32 namelen)
|
||||
SOCKET s;
|
||||
|
||||
sd++;
|
||||
BSDTRACE((L"bind(%d,0x%lx,%d) -> ",sd, name, namelen));
|
||||
BSDTRACE((L"bind(%d,0x%x,%d) -> ",sd, name, namelen));
|
||||
s = getsock(sb, sd);
|
||||
|
||||
if (s != INVALID_SOCKET) {
|
||||
@ -948,7 +948,7 @@ void host_connect(TrapContext *context, SB, uae_u32 sd, uae_u32 name, uae_u32 na
|
||||
uae_char buf[MAXADDRLEN];
|
||||
|
||||
sd++;
|
||||
BSDTRACE((L"connect(%d,0x%lx,%d) -> ", sd, name, namelen));
|
||||
BSDTRACE((L"connect(%d,0x%x,%d) -> ", sd, name, namelen));
|
||||
|
||||
if (!addr_valid (L"host_connect", name, namelen))
|
||||
return;
|
||||
@ -1023,9 +1023,9 @@ void host_sendto (TrapContext *context, SB, uae_u32 sd, uae_u32 msg, uae_u32 len
|
||||
|
||||
#ifdef TRACING_ENABLED
|
||||
if (to)
|
||||
BSDTRACE((L"sendto(%d,0x%lx,%d,0x%lx,0x%lx,%d) -> ",sd,msg,len,flags,to,tolen));
|
||||
BSDTRACE((L"sendto(%d,0x%x,%d,0x%x,0x%x,%d) -> ",sd,msg,len,flags,to,tolen));
|
||||
else
|
||||
BSDTRACE((L"send(%d,0x%lx,%d,%d) -> ",sd,msg,len,flags));
|
||||
BSDTRACE((L"send(%d,0x%x,%d,%d) -> ",sd,msg,len,flags));
|
||||
#endif
|
||||
sd++;
|
||||
s = getsock(sb,sd);
|
||||
@ -1189,9 +1189,9 @@ void host_recvfrom(TrapContext *context, SB, uae_u32 sd, uae_u32 msg, uae_u32 le
|
||||
|
||||
#ifdef TRACING_ENABLED
|
||||
if (addr)
|
||||
BSDTRACE((L"recvfrom(%d,0x%lx,%d,0x%lx,0x%lx,%d) -> ",sd,msg,len,flags,addr,get_long (addrlen)));
|
||||
BSDTRACE((L"recvfrom(%d,0x%x,%d,0x%x,0x%x,%d) -> ",sd,msg,len,flags,addr,get_long (addrlen)));
|
||||
else
|
||||
BSDTRACE((L"recv(%d,0x%lx,%d,0x%lx) -> ",sd,msg,len,flags));
|
||||
BSDTRACE((L"recv(%d,0x%x,%d,0x%x) -> ",sd,msg,len,flags));
|
||||
#endif
|
||||
sd++;
|
||||
s = getsock(sb,sd);
|
||||
@ -1324,8 +1324,9 @@ void host_setsockopt(SB, uae_u32 sd, uae_u32 level, uae_u32 optname, uae_u32 opt
|
||||
{
|
||||
SOCKET s;
|
||||
uae_char buf[MAXADDRLEN];
|
||||
int i;
|
||||
|
||||
BSDTRACE((L"setsockopt(%d,%d,0x%lx,0x%lx,%d) -> ",sd,(short)level,optname,optval,len));
|
||||
BSDTRACE((L"setsockopt(%d,%d,0x%x,0x%x[0x%x],%d) -> ",sd,(short)level,optname,optval,get_long(optval),len));
|
||||
sd++;
|
||||
s = getsock(sb,sd);
|
||||
|
||||
@ -1338,20 +1339,24 @@ void host_setsockopt(SB, uae_u32 sd, uae_u32 level, uae_u32 optname, uae_u32 opt
|
||||
sb->resultval = 0;
|
||||
return;
|
||||
}
|
||||
if (level == SOL_SOCKET && optname == SO_LINGER) {
|
||||
((LINGER *)buf)->l_onoff = get_long (optval);
|
||||
((LINGER *)buf)->l_linger = get_long (optval + 4);
|
||||
} else {
|
||||
if (len == 4)
|
||||
*(long *)buf = get_long (optval);
|
||||
else if (len == 2)
|
||||
*(short *)buf = get_word (optval);
|
||||
else
|
||||
write_log (L"BSDSOCK: ERROR - Unknown optlen (%d) in setsockopt(%d,%d)\n", len, level, optname);
|
||||
|
||||
for (i = 0; i < len / 4; i++) {
|
||||
((long*)buf)[i] = get_long (optval + i * 4);
|
||||
}
|
||||
if (len - i == 2)
|
||||
((long*)buf)[i] = get_word (optval + i * 4);
|
||||
else if (len - i == 1)
|
||||
((long*)buf)[i] = get_byte (optval + i * 4);
|
||||
|
||||
/* timeval -> milliseconds */
|
||||
if (level == SOL_SOCKET && (optname == SO_SNDTIMEO || optname == SO_RCVTIMEO)) {
|
||||
uae_u32 millis = ((long*)buf)[0] * 1000 + ((long*)buf)[1] / 1000;
|
||||
((long*)buf)[0] = millis;
|
||||
len = 4;
|
||||
}
|
||||
|
||||
// handle SO_EVENTMASK
|
||||
if (level == 0xffff && optname == 0x2001) {
|
||||
if (level == SOL_SOCKET && optname == 0x2001) {
|
||||
long wsbevents = 0;
|
||||
uae_u32 eventflags = get_long (optval);
|
||||
|
||||
@ -1375,8 +1380,9 @@ void host_setsockopt(SB, uae_u32 sd, uae_u32 level, uae_u32 optname, uae_u32 opt
|
||||
sb->resultval = 0;
|
||||
} else
|
||||
sb->resultval = -1;
|
||||
} else
|
||||
} else {
|
||||
sb->resultval = setsockopt(s,level,optname,buf,len);
|
||||
}
|
||||
|
||||
if (!sb->resultval) {
|
||||
BSDTRACE((L"OK\n"));
|
||||
@ -1392,28 +1398,56 @@ uae_u32 host_getsockopt(SB, uae_u32 sd, uae_u32 level, uae_u32 optname, uae_u32
|
||||
{
|
||||
SOCKET s;
|
||||
uae_char buf[MAXADDRLEN];
|
||||
int len = sizeof(buf);
|
||||
int len = sizeof buf;
|
||||
uae_u32 outlen;
|
||||
|
||||
BSDTRACE((L"getsockopt(%d,%d,0x%lx,0x%lx,0x%lx) -> ",sd,(short)level,optname,optval,optlen));
|
||||
if (optval)
|
||||
outlen = get_long (optlen);
|
||||
else
|
||||
outlen = 0;
|
||||
|
||||
BSDTRACE((L"getsockopt(%d,%d,0x%x,0x%x,0x%x[%d]) -> ",sd,(short)level,optname,optval,optlen,outlen));
|
||||
sd++;
|
||||
s = getsock(sb,sd);
|
||||
|
||||
if (s != INVALID_SOCKET) {
|
||||
if (!getsockopt(s,level,optname,buf,&len)) {
|
||||
if (level == SOL_SOCKET && optname == SO_LINGER) {
|
||||
put_long (optval,((LINGER *)buf)->l_onoff);
|
||||
put_long (optval+4,((LINGER *)buf)->l_linger);
|
||||
} else {
|
||||
if (len == 4)
|
||||
put_long (optval,*(long *)buf);
|
||||
else if (len == 2)
|
||||
put_word (optval,*(short *)buf);
|
||||
else
|
||||
write_log (L"BSDSOCK: ERROR - Unknown optlen (%d) in setsockopt(%d,%d)\n", len, level, optname);
|
||||
BSDTRACE((L"0x%x, %d -> ", *((long*)buf), len));
|
||||
uae_u32 outcnt = 0;
|
||||
if (outlen) {
|
||||
if (level == SOL_SOCKET && (optname == SO_SNDTIMEO || optname == SO_RCVTIMEO)) {
|
||||
/* long milliseconds -> timeval */
|
||||
uae_u32 millis = *((long*)buf);
|
||||
((long*)buf)[0] = millis / 1000; /* secs */
|
||||
((long*)buf)[1] = (millis % 1000) * 1000; /* usecs */
|
||||
len = 8;
|
||||
}
|
||||
// len can equal 1 */
|
||||
for (int i = 0; i < len; i += 4) {
|
||||
uae_u32 v;
|
||||
if (len - i >= 4)
|
||||
v = *((long*)(buf + i));
|
||||
else if (len - i >= 2)
|
||||
v = *((short*)(buf + i));
|
||||
else
|
||||
v = buf[i];
|
||||
if (outlen >= 4) {
|
||||
put_long (optval + outcnt, v);
|
||||
outlen -= 4;
|
||||
outcnt += 4;
|
||||
} else if (outlen >= 2) {
|
||||
put_word (optval + outcnt, v);
|
||||
outlen -= 2;
|
||||
outcnt += 2;
|
||||
} else if (outlen > 0) {
|
||||
put_byte (optval + outcnt, v);
|
||||
outlen -= 1;
|
||||
outcnt += 1;
|
||||
}
|
||||
}
|
||||
put_long (optlen,outcnt);
|
||||
}
|
||||
|
||||
// put_long (optlen,len); // some programs pass the actual length instead of a pointer to the length, so...
|
||||
BSDTRACE((L"OK (%d,%d)\n",len,*(long *)buf));
|
||||
BSDTRACE((L"OK (%d,0x%x)\n",outcnt,get_long(optval)));
|
||||
return 0;
|
||||
} else {
|
||||
SETERRNO;
|
||||
@ -1435,7 +1469,7 @@ uae_u32 host_getsockname(SB, uae_u32 sd, uae_u32 name, uae_u32 namelen)
|
||||
return -1;
|
||||
len = get_long (namelen);
|
||||
|
||||
BSDTRACE((L"getsockname(%d,0x%lx,%d) -> ",sd,name,len));
|
||||
BSDTRACE((L"getsockname(%d,0x%x,%d) -> ",sd,name,len));
|
||||
|
||||
s = getsock(sb,sd);
|
||||
|
||||
@ -1469,7 +1503,7 @@ uae_u32 host_getpeername(SB, uae_u32 sd, uae_u32 name, uae_u32 namelen)
|
||||
return -1;
|
||||
len = get_long (namelen);
|
||||
|
||||
BSDTRACE((L"getpeername(%d,0x%lx,%d) -> ",sd,name,len));
|
||||
BSDTRACE((L"getpeername(%d,0x%x,%d) -> ",sd,name,len));
|
||||
|
||||
s = getsock(sb,sd);
|
||||
|
||||
@ -1498,7 +1532,7 @@ uae_u32 host_IoctlSocket(TrapContext *context, SB, uae_u32 sd, uae_u32 request,
|
||||
uae_u32 data;
|
||||
int success = SOCKET_ERROR;
|
||||
|
||||
BSDTRACE((L"IoctlSocket(%d,0x%lx,0x%lx) ",sd,request,arg));
|
||||
BSDTRACE((L"IoctlSocket(%d,0x%x,0x%x) ",sd,request,arg));
|
||||
sd++;
|
||||
s = getsock(sb,sd);
|
||||
|
||||
@ -1759,12 +1793,16 @@ static unsigned int thread_WaitSelect2(void *indexp)
|
||||
if (bsd->hEvents[index] == NULL)
|
||||
break;
|
||||
sb->resultval = resultval;
|
||||
|
||||
#if 0 /* what was this doing here? */
|
||||
if (sb->resultval == 0) { // Now timeout -> really no data available
|
||||
if (GetLastError() != 0) {
|
||||
sb->resultval = SOCKET_ERROR;
|
||||
// Set old resultval
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
if (FD_ISSET(sb->sockAbort,&readsocks)) {
|
||||
@ -1820,7 +1858,7 @@ void host_WaitSelect(TrapContext *context, SB, uae_u32 nfds, uae_u32 readfds, ua
|
||||
|
||||
wssigs = sigmp ? get_long (sigmp) : 0;
|
||||
|
||||
BSDTRACE((L"WaitSelect(%d,0x%lx,0x%lx,0x%lx,0x%lx,0x%lx) ",
|
||||
BSDTRACE((L"WaitSelect(%d,0x%x,0x%x,0x%x,0x%x,0x%x) ",
|
||||
nfds, readfds, writefds, exceptfds, timeout, wssigs));
|
||||
|
||||
if (!readfds && !writefds && !exceptfds && !timeout && !wssigs) {
|
||||
@ -1870,6 +1908,8 @@ void host_WaitSelect(TrapContext *context, SB, uae_u32 nfds, uae_u32 readfds, ua
|
||||
|
||||
sb->needAbort = 1;
|
||||
|
||||
locksigqueue ();
|
||||
|
||||
for (i = 0; i < MAX_SELECT_THREADS; i++) {
|
||||
if (bsd->hThreads[i] && !bsd->threadargsw[i])
|
||||
break;
|
||||
@ -1882,6 +1922,7 @@ void host_WaitSelect(TrapContext *context, SB, uae_u32 nfds, uae_u32 readfds, ua
|
||||
bsd->hThreads[i] = THREAD(thread_WaitSelect, &threadindextable[i]);
|
||||
if (bsd->hEvents[i] == NULL || bsd->hThreads[i] == NULL) {
|
||||
bsd->hThreads[i] = 0;
|
||||
unlocksigqueue ();
|
||||
write_log (L"BSDSOCK: ERROR - Thread/Event creation failed - error code: %d\n",
|
||||
GetLastError());
|
||||
bsdsocklib_seterrno(sb,12); // ENOMEM
|
||||
@ -1895,9 +1936,11 @@ void host_WaitSelect(TrapContext *context, SB, uae_u32 nfds, uae_u32 readfds, ua
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= MAX_SELECT_THREADS)
|
||||
unlocksigqueue ();
|
||||
|
||||
if (i >= MAX_SELECT_THREADS) {
|
||||
write_log (L"BSDSOCK: ERROR - Too many select()s\n");
|
||||
else {
|
||||
} else {
|
||||
SOCKET newsock = INVALID_SOCKET;
|
||||
|
||||
taw.sb = sb;
|
||||
@ -1969,12 +2012,16 @@ uae_u32 host_Inet_NtoA(TrapContext *context, SB, uae_u32 in)
|
||||
|
||||
*(uae_u32 *)&ina = htonl(in);
|
||||
|
||||
BSDTRACE((L"Inet_NtoA(%lx) -> ",in));
|
||||
BSDTRACE((L"Inet_NtoA(%x) -> ",in));
|
||||
|
||||
if ((addr = inet_ntoa(ina)) != NULL) {
|
||||
scratchbuf = m68k_areg (regs,6) + offsetof(struct UAEBSDBase,scratchbuf);
|
||||
strncpyha(scratchbuf,addr,SCRATCHBUFSIZE);
|
||||
BSDTRACE((L"%s\n",addr));
|
||||
#ifdef TRACING_ENABLED
|
||||
TCHAR *s = au (addr);
|
||||
BSDTRACE((L"%s\n",s));
|
||||
xfree (s);
|
||||
#endif
|
||||
return scratchbuf;
|
||||
} else
|
||||
SETERRNO;
|
||||
@ -1995,8 +2042,11 @@ uae_u32 host_inet_addr(uae_u32 cp)
|
||||
|
||||
addr = htonl(inet_addr(cp_rp));
|
||||
|
||||
#ifdef TRACING_ENABLED
|
||||
TCHAR *s = au (cp_rp);
|
||||
BSDTRACE((L"inet_addr(%s) -> 0x%08lx\n",cp_rp,addr));
|
||||
|
||||
xfree (s);
|
||||
#endif
|
||||
return addr;
|
||||
}
|
||||
|
||||
@ -2258,8 +2308,11 @@ void host_gethostbynameaddr (TrapContext *context, SB, uae_u32 name, uae_u32 nam
|
||||
name_rp = (char*)get_real_address (name);
|
||||
|
||||
if (addrtype == -1) {
|
||||
BSDTRACE((L"gethostbyname(%s) -> ",name_rp));
|
||||
|
||||
#ifdef TRACING_ENABLED
|
||||
TCHAR *s = au (name_rp);
|
||||
BSDTRACE((L"gethostbyname(%s) -> ",s));
|
||||
xfree (s);
|
||||
#endif
|
||||
// workaround for numeric host "names"
|
||||
if ((addr = inet_addr(name_rp)) != INADDR_NONE) {
|
||||
bsdsocklib_seterrno(sb,0);
|
||||
@ -2274,7 +2327,7 @@ void host_gethostbynameaddr (TrapContext *context, SB, uae_u32 name, uae_u32 nam
|
||||
goto kludge;
|
||||
}
|
||||
} else {
|
||||
BSDTRACE((L"gethostbyaddr(0x%lx,0x%lx,%ld) -> ",name,namelen,addrtype));
|
||||
BSDTRACE((L"gethostbyaddr(0x%x,0x%x,%ld) -> ",name,namelen,addrtype));
|
||||
}
|
||||
|
||||
argsp->sb = sb;
|
||||
@ -2339,7 +2392,11 @@ kludge:
|
||||
put_long (sb->hostent, aptr);
|
||||
addstr_ansi (&aptr, h->h_name);
|
||||
|
||||
BSDTRACE((L"OK (%s)\n", h->h_name));
|
||||
#ifdef TRACING_ENABLED
|
||||
TCHAR *s = au (h->h_name);
|
||||
BSDTRACE((L"OK (%s)\n", s));
|
||||
xfree (s);
|
||||
#endif
|
||||
bsdsocklib_seterrno(sb, 0);
|
||||
bsdsocklib_setherrno(sb, 0);
|
||||
|
||||
@ -2363,7 +2420,11 @@ void host_getprotobyname(TrapContext *context, SB, uae_u32 name)
|
||||
if (addr_valid (L"host_gethostbynameaddr", name, 1))
|
||||
name_rp = (char*)get_real_address (name);
|
||||
|
||||
BSDTRACE((L"getprotobyname(%s) -> ",name_rp));
|
||||
#ifdef TRACING_ENABLED
|
||||
TCHAR *s = au (name_rp);
|
||||
BSDTRACE((L"getprotobyname(%s) -> ",s));
|
||||
xfree (s);
|
||||
#endif
|
||||
|
||||
memset(&args, 0, sizeof (args));
|
||||
argsp = &args;
|
||||
@ -2393,9 +2454,13 @@ void host_getprotobyname(TrapContext *context, SB, uae_u32 name)
|
||||
sb->protoent = uae_AllocMem(context, size, 0);
|
||||
|
||||
if (!sb->protoent) {
|
||||
#ifdef TRACING_ENABLED
|
||||
TCHAR *s = au (name_rp);
|
||||
write_log (L"BSDSOCK: WARNING - getprotobyname() ran out of Amiga memory "
|
||||
L"(couldn't allocate %ld bytes) while returning result of lookup for '%s'\n",
|
||||
size, name_rp);
|
||||
size, s);
|
||||
xfree (s);
|
||||
#endif
|
||||
bsdsocklib_seterrno(sb,12); // ENOMEM
|
||||
return;
|
||||
}
|
||||
@ -2413,7 +2478,11 @@ void host_getprotobyname(TrapContext *context, SB, uae_u32 name)
|
||||
put_long (sb->protoent + 12 + numaliases * 4,0);
|
||||
put_long (sb->protoent, aptr);
|
||||
addstr_ansi (&aptr, p->p_name);
|
||||
BSDTRACE((L"OK (%s, %d)\n", p->p_name, p->p_proto));
|
||||
#ifdef TRACING_ENABLED
|
||||
TCHAR *s = au (p->p_name);
|
||||
BSDTRACE((L"OK (%s, %d)\n", s, p->p_proto));
|
||||
xfree (s);
|
||||
#endif
|
||||
bsdsocklib_seterrno (sb,0);
|
||||
|
||||
} else {
|
||||
@ -2483,7 +2552,7 @@ void host_getservbynameport(TrapContext *context, SB, uae_u32 nameport, uae_u32
|
||||
sb->servent = uae_AllocMem(context, size, 0);
|
||||
|
||||
if (!sb->servent) {
|
||||
write_log (L"BSDSOCK: WARNING - getservby%s() ran out of Amiga memory (couldn't allocate %ld bytes)\n", type ? "port" : "name", size);
|
||||
write_log (L"BSDSOCK: WARNING - getservby%s() ran out of Amiga memory (couldn't allocate %ld bytes)\n", type ? L"port" : L"name", size);
|
||||
bsdsocklib_seterrno(sb, 12); // ENOMEM
|
||||
return;
|
||||
}
|
||||
@ -2504,7 +2573,11 @@ void host_getservbynameport(TrapContext *context, SB, uae_u32 nameport, uae_u32
|
||||
put_long (sb->servent + 12, aptr);
|
||||
addstr_ansi (&aptr, s->s_proto);
|
||||
|
||||
BSDTRACE((L"OK (%s, %d)\n", s->s_name, (unsigned short)htons(s->s_port)));
|
||||
#ifdef TRACING_ENABLED
|
||||
TCHAR *ss = au (s->s_name);
|
||||
BSDTRACE((L"OK (%s, %d)\n", ss, (unsigned short)htons(s->s_port)));
|
||||
xfree (ss);
|
||||
#endif
|
||||
bsdsocklib_seterrno(sb, 0);
|
||||
|
||||
} else {
|
||||
|
||||
@ -14,6 +14,7 @@ int rawinput_enabled_hid = -1;
|
||||
//#define DI_DEBUG2
|
||||
#define DI_DEBUG_RAWINPUT_KB 0
|
||||
#define DI_DEBUG_RAWINPUT_MOUSE 0
|
||||
#define DI_DEBUG_RAWINPUT_HID 0
|
||||
#define IGNOREEVERYTHING 0
|
||||
|
||||
#include "sysconfig.h"
|
||||
@ -455,15 +456,15 @@ static int doregister_rawinput (bool add)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (num == 0)
|
||||
return 1;
|
||||
if (RegisterRawInputDevices (rid, num, sizeof (RAWINPUTDEVICE)) == FALSE) {
|
||||
write_log (L"RAWINPUT %sregistration failed %d (%d,%d->%d,%d->%d,%d->%d)\n",
|
||||
add ? L"" : L"un", GetLastError (), num,
|
||||
rawinput_registered_mouse, rm,
|
||||
rawinput_registered_kb, rkb,
|
||||
rawinput_registered_hid, rhid);
|
||||
return 0;
|
||||
if (num > 0) {
|
||||
if (RegisterRawInputDevices (rid, num, sizeof (RAWINPUTDEVICE)) == FALSE) {
|
||||
write_log (L"RAWINPUT %sregistration failed %d (%d,%d->%d,%d->%d,%d->%d)\n",
|
||||
add ? L"" : L"un", GetLastError (), num,
|
||||
rawinput_registered_mouse, rm,
|
||||
rawinput_registered_kb, rkb,
|
||||
rawinput_registered_hid, rhid);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
rawinput_registered_mouse = rm;
|
||||
rawinput_registered_kb = rkb;
|
||||
@ -1759,7 +1760,7 @@ static void handle_rawinput_2 (RAWINPUT *raw)
|
||||
PRAWHID hid = &raw->data.hid;
|
||||
HANDLE h = raw->header.hDevice;
|
||||
PCHAR rawdata;
|
||||
#if 0
|
||||
#if DI_DEBUG_RAWINPUT_HID
|
||||
uae_u8 *r = hid->bRawData;
|
||||
write_log (L"%d %d %02x%02x%02x%02x%02x%02x%02x\n", hid->dwCount, hid->dwSizeHid,
|
||||
r[0], r[1], r[2], r[3], r[4], r[5], r[6]);
|
||||
@ -1788,7 +1789,9 @@ static void handle_rawinput_2 (RAWINPUT *raw)
|
||||
break;
|
||||
}
|
||||
if (j == did->maxusagelistlength || did->prevusagelist[j].Usage == 0) {
|
||||
//write_log (L"%d/%d ON\n", did->usagelist[k].UsagePage, did->usagelist[k].Usage);
|
||||
#if DI_DEBUG_RAWINPUT_HID
|
||||
write_log (L"%d/%d ON\n", did->usagelist[k].UsagePage, did->usagelist[k].Usage);
|
||||
#endif
|
||||
for (int l = 0; l < did->buttons; l++) {
|
||||
if (did->buttonmappings[l] == did->usagelist[k].Usage)
|
||||
setjoybuttonstate (num, l, 1);
|
||||
@ -1799,9 +1802,11 @@ static void handle_rawinput_2 (RAWINPUT *raw)
|
||||
}
|
||||
for (j = 0; j < did->maxusagelistlength; j++) {
|
||||
if (did->prevusagelist[j].Usage) {
|
||||
//write_log (L"%d/%d OFF\n", did->prevusagelist[j].UsagePage, did->prevusagelist[j].Usage);
|
||||
#if DI_DEBUG_RAWINPUT_HID
|
||||
write_log (L"%d/%d OFF\n", did->prevusagelist[j].UsagePage, did->prevusagelist[j].Usage);
|
||||
#endif
|
||||
for (int l = 0; l < did->buttons; l++) {
|
||||
if (did->buttonmappings[l] == did->prevusagelist[k].Usage)
|
||||
if (did->buttonmappings[l] == did->prevusagelist[j].Usage)
|
||||
setjoybuttonstate (num, l, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1897,7 +1897,7 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth
|
||||
typedef HRESULT (WINAPI *LPDIRECT3DCREATE9EX)(UINT, IDirect3D9Ex**);
|
||||
LPDIRECT3DCREATE9EX d3dexp = NULL;
|
||||
int vsync = isvsync ();
|
||||
int bb = picasso_on ? currprefs.gfx_rtg_backbuffers : currprefs.gfx_backbuffers;
|
||||
struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
|
||||
|
||||
D3D_free2 ();
|
||||
if (!currprefs.gfx_api) {
|
||||
@ -1967,12 +1967,12 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth
|
||||
memset (&dpp, 0, sizeof (dpp));
|
||||
dpp.Windowed = isfullscreen () <= 0;
|
||||
dpp.BackBufferFormat = mode.Format;
|
||||
dpp.BackBufferCount = bb;
|
||||
dpp.BackBufferCount = ap->gfx_backbuffers;
|
||||
dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||
dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
|
||||
dpp.BackBufferWidth = w_w;
|
||||
dpp.BackBufferHeight = w_h;
|
||||
dpp.PresentationInterval = dpp.BackBufferCount == 0 ? D3DPRESENT_INTERVAL_IMMEDIATE : D3DPRESENT_INTERVAL_ONE;
|
||||
dpp.PresentationInterval = !ap->gfx_vflip ? D3DPRESENT_INTERVAL_IMMEDIATE : D3DPRESENT_INTERVAL_ONE;
|
||||
|
||||
modeex.Width = w_w;
|
||||
modeex.Height = w_h;
|
||||
@ -2082,7 +2082,7 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth
|
||||
dpp.Windowed ? L"" : L" FS",
|
||||
vsync, dpp.BackBufferCount,
|
||||
dpp.PresentationInterval & D3DPRESENT_INTERVAL_IMMEDIATE ? L"I" : L"F",
|
||||
bb == 0 ? L"E" : L"",
|
||||
ap->gfx_backbuffers == 0 ? L"E" : L"",
|
||||
t_depth, adapter
|
||||
);
|
||||
|
||||
@ -2150,13 +2150,13 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int t_w, int t_h, int depth
|
||||
d3d_enabled = 1;
|
||||
wasstilldrawing_broken = true;
|
||||
|
||||
if (vsync < 0 && bb == 0) {
|
||||
if (vsync < 0 && ap->gfx_backbuffers == 0) {
|
||||
hr = d3ddev->CreateQuery(D3DQUERYTYPE_EVENT, &query);
|
||||
if (FAILED (hr))
|
||||
write_log (L"%s: CreateQuery(D3DQUERYTYPE_EVENT) failed: %s\n", D3DHEAD, D3D_ErrorString (hr));
|
||||
}
|
||||
if (d3ddevex) {
|
||||
hr = d3ddevex->SetMaximumFrameLatency (vsync < 0 && bb == 0 ? 1 : 0);
|
||||
hr = d3ddevex->SetMaximumFrameLatency (vsync < 0 && ap->gfx_backbuffers == 0 ? 1 : 0);
|
||||
if (FAILED (hr))
|
||||
write_log (L"%s: SetMaximumFrameLatency() failed: %s\n", D3DHEAD, D3D_ErrorString (hr));
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ HRESULT DirectDraw_GetDisplayMode (void)
|
||||
|
||||
static LPDIRECTDRAWSURFACE7 getlocksurface (void)
|
||||
{
|
||||
if (dxdata.backbuffers > 0 && currprefs.gfx_afullscreen > 0 && !WIN32GFX_IsPicassoScreen ())
|
||||
if (dxdata.backbuffers > 0 && currprefs.gfx_apmode[0].gfx_fullscreen > 0 && !WIN32GFX_IsPicassoScreen ())
|
||||
return dxdata.flipping[0];
|
||||
return dxdata.secondary;
|
||||
}
|
||||
@ -334,7 +334,7 @@ HRESULT DirectDraw_CreateMainSurface (int width, int height)
|
||||
HRESULT ddrval;
|
||||
DDSURFACEDESC2 desc = { 0 };
|
||||
LPDIRECTDRAWSURFACE7 surf;
|
||||
int bb = WIN32GFX_IsPicassoScreen () ? currprefs.gfx_rtg_backbuffers : currprefs.gfx_backbuffers;
|
||||
struct apmode *ap = WIN32GFX_IsPicassoScreen () ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
|
||||
|
||||
width = (width + 7) & ~7;
|
||||
desc.dwSize = sizeof (desc);
|
||||
@ -346,7 +346,7 @@ HRESULT DirectDraw_CreateMainSurface (int width, int height)
|
||||
DWORD oldflags = desc.dwFlags;
|
||||
desc.dwFlags |= DDSD_BACKBUFFERCOUNT;
|
||||
desc.ddsCaps.dwCaps |= DDSCAPS_COMPLEX | DDSCAPS_FLIP;
|
||||
desc.dwBackBufferCount = bb == 0 ? 1 : bb;
|
||||
desc.dwBackBufferCount = ap->gfx_backbuffers == 0 ? 1 : ap->gfx_backbuffers;
|
||||
if (desc.dwBackBufferCount > 0) {
|
||||
ddrval = IDirectDraw7_CreateSurface (dxdata.maindd, &desc, &dxdata.primary, NULL);
|
||||
if (SUCCEEDED (ddrval)) {
|
||||
@ -907,9 +907,9 @@ static void flip (void)
|
||||
HRESULT ddrval = DD_OK;
|
||||
DWORD flags = DDFLIP_DONOTWAIT;
|
||||
int vsync = isvsync ();
|
||||
int bb = WIN32GFX_IsPicassoScreen () ? currprefs.gfx_rtg_backbuffers : currprefs.gfx_backbuffers;
|
||||
struct apmode *ap = WIN32GFX_IsPicassoScreen () ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
|
||||
|
||||
if (currprefs.turbo_emulation || (vsync && bb == 0))
|
||||
if (currprefs.turbo_emulation || !ap->gfx_vflip)
|
||||
flags |= DDFLIP_NOVSYNC;
|
||||
if (dxdata.backbuffers == 2) {
|
||||
DirectDraw_Blit (dxdata.flipping[1], dxdata.flipping[0]);
|
||||
|
||||
@ -58,13 +58,12 @@ struct PicassoResolution
|
||||
int depth; /* depth in bytes-per-pixel */
|
||||
int residx;
|
||||
int refresh[MAX_REFRESH_RATES]; /* refresh-rates in Hz */
|
||||
int refreshtype[MAX_REFRESH_RATES]; /* 0=normal,1=enumdisplaysettings+raw */
|
||||
int refreshtype[MAX_REFRESH_RATES]; /* 0=normal,1=raw */
|
||||
TCHAR name[25];
|
||||
/* Bit mask of RGBFF_xxx values. */
|
||||
uae_u32 colormodes;
|
||||
int rawmode;
|
||||
};
|
||||
extern GUID *displayGUID;
|
||||
|
||||
struct MultiDisplay {
|
||||
bool primary;
|
||||
|
||||
@ -131,7 +131,7 @@ static struct uae_input_device_kbr_default keytrans_amiga[] = {
|
||||
{ DIK_RMENU, INPUTEVENT_KEY_ALT_RIGHT },
|
||||
{ DIK_RWIN, INPUTEVENT_KEY_AMIGA_RIGHT },
|
||||
{ DIK_APPS, INPUTEVENT_KEY_AMIGA_RIGHT },
|
||||
{ DIK_RCONTROL, INPUTEVENT_KEY_CTRL_RIGHT },
|
||||
{ DIK_RCONTROL, INPUTEVENT_KEY_CTRL },
|
||||
{ DIK_RSHIFT, INPUTEVENT_KEY_SHIFT_RIGHT },
|
||||
|
||||
{ DIK_UP, INPUTEVENT_KEY_CURSOR_UP },
|
||||
@ -266,7 +266,7 @@ static struct uae_input_device_kbr_default keytrans_pc1[] = {
|
||||
{ DIK_RMENU, INPUTEVENT_KEY_ALT_RIGHT },
|
||||
{ DIK_RWIN, INPUTEVENT_KEY_AMIGA_RIGHT },
|
||||
{ DIK_APPS, INPUTEVENT_KEY_APPS },
|
||||
{ DIK_RCONTROL, INPUTEVENT_KEY_CTRL_RIGHT },
|
||||
{ DIK_RCONTROL, INPUTEVENT_KEY_CTRL },
|
||||
{ DIK_RSHIFT, INPUTEVENT_KEY_SHIFT_RIGHT },
|
||||
|
||||
{ DIK_UP, INPUTEVENT_KEY_CURSOR_UP },
|
||||
|
||||
@ -1951,6 +1951,21 @@ static int p96depth (int depth)
|
||||
return ok;
|
||||
}
|
||||
|
||||
static int _cdecl resolution_compare (const void *a, const void *b)
|
||||
{
|
||||
struct PicassoResolution *ma = (struct PicassoResolution *)a;
|
||||
struct PicassoResolution *mb = (struct PicassoResolution *)b;
|
||||
if (ma->res.width < mb->res.width)
|
||||
return -1;
|
||||
if (ma->res.width > mb->res.width)
|
||||
return 1;
|
||||
if (ma->res.height < mb->res.height)
|
||||
return -1;
|
||||
if (ma->res.height > mb->res.height)
|
||||
return 1;
|
||||
return ma->depth - mb->depth;
|
||||
}
|
||||
|
||||
static int missmodes[] = { 320, 200, 320, 240, 320, 256, 640, 400, 640, 480, 640, 512, 800, 600, 1024, 768, 1280, 1024, -1 };
|
||||
|
||||
static uaecptr uaegfx_card_install (TrapContext *ctx, uae_u32 size);
|
||||
@ -1959,8 +1974,6 @@ static void picasso96_alloc2 (TrapContext *ctx)
|
||||
{
|
||||
int i, j, size, cnt;
|
||||
int misscnt, depths;
|
||||
struct MultiDisplay *md = getdisplay (&currprefs);
|
||||
struct PicassoResolution *DisplayModes = md->DisplayModes;
|
||||
|
||||
xfree (newmodes);
|
||||
newmodes = NULL;
|
||||
@ -1968,7 +1981,6 @@ static void picasso96_alloc2 (TrapContext *ctx)
|
||||
if (allocated_gfxmem == 0)
|
||||
return;
|
||||
misscnt = 0;
|
||||
cnt = 0;
|
||||
newmodes = xmalloc (struct PicassoResolution, MAX_PICASSO_MODES);
|
||||
size = 0;
|
||||
|
||||
@ -1984,51 +1996,66 @@ static void picasso96_alloc2 (TrapContext *ctx)
|
||||
if (p96depth (32))
|
||||
depths++;
|
||||
|
||||
i = 0;
|
||||
while (DisplayModes[i].depth >= 0) {
|
||||
for (j = 0; missmodes[j * 2] >= 0; j++) {
|
||||
if (DisplayModes[i].res.width == missmodes[j * 2 + 0] && DisplayModes[i].res.height == missmodes[j * 2 + 1]) {
|
||||
missmodes[j * 2 + 0] = 0;
|
||||
missmodes[j * 2 + 1] = 0;
|
||||
for (int mon = 0; Displays[mon].monitorname; mon++) {
|
||||
struct PicassoResolution *DisplayModes = Displays[mon].DisplayModes;
|
||||
i = 0;
|
||||
while (DisplayModes[i].depth >= 0) {
|
||||
for (j = 0; missmodes[j * 2] >= 0; j++) {
|
||||
if (DisplayModes[i].res.width == missmodes[j * 2 + 0] && DisplayModes[i].res.height == missmodes[j * 2 + 1]) {
|
||||
missmodes[j * 2 + 0] = 0;
|
||||
missmodes[j * 2 + 1] = 0;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while (DisplayModes[i].depth >= 0) {
|
||||
if (DisplayModes[i].rawmode) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
j = i;
|
||||
size += PSSO_LibResolution_sizeof;
|
||||
while (missmodes[misscnt * 2] == 0)
|
||||
misscnt++;
|
||||
if (missmodes[misscnt * 2] >= 0) {
|
||||
int w = DisplayModes[i].res.width;
|
||||
int h = DisplayModes[i].res.height;
|
||||
if (w > missmodes[misscnt * 2 + 0] || (w == missmodes[misscnt * 2 + 0] && h > missmodes[misscnt * 2 + 1])) {
|
||||
struct PicassoResolution *pr = &newmodes[cnt];
|
||||
memcpy (pr, &DisplayModes[i], sizeof (struct PicassoResolution));
|
||||
pr->res.width = missmodes[misscnt * 2 + 0];
|
||||
pr->res.height = missmodes[misscnt * 2 + 1];
|
||||
_stprintf (pr->name, L"%dx%d FAKE", pr->res.width, pr->res.height);
|
||||
size += PSSO_ModeInfo_sizeof * depths;
|
||||
cnt++;
|
||||
misscnt++;
|
||||
cnt = 0;
|
||||
for (int mon = 0; Displays[mon].monitorname; mon++) {
|
||||
struct PicassoResolution *DisplayModes = Displays[mon].DisplayModes;
|
||||
i = 0;
|
||||
while (DisplayModes[i].depth >= 0) {
|
||||
if (DisplayModes[i].rawmode) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
memcpy (&newmodes[cnt], &DisplayModes[i], sizeof (struct PicassoResolution));
|
||||
size += PSSO_ModeInfo_sizeof * depths;
|
||||
i++;
|
||||
cnt++;
|
||||
while (DisplayModes[i].depth >= 0
|
||||
&& DisplayModes[i].res.width == DisplayModes[j].res.width
|
||||
&& DisplayModes[i].res.height == DisplayModes[j].res.height)
|
||||
j = i;
|
||||
size += PSSO_LibResolution_sizeof;
|
||||
while (missmodes[misscnt * 2] == 0)
|
||||
misscnt++;
|
||||
if (missmodes[misscnt * 2] >= 0) {
|
||||
int w = DisplayModes[i].res.width;
|
||||
int h = DisplayModes[i].res.height;
|
||||
if (w > missmodes[misscnt * 2 + 0] || (w == missmodes[misscnt * 2 + 0] && h > missmodes[misscnt * 2 + 1])) {
|
||||
struct PicassoResolution *pr = &newmodes[cnt];
|
||||
memcpy (pr, &DisplayModes[i], sizeof (struct PicassoResolution));
|
||||
pr->res.width = missmodes[misscnt * 2 + 0];
|
||||
pr->res.height = missmodes[misscnt * 2 + 1];
|
||||
_stprintf (pr->name, L"%dx%d FAKE", pr->res.width, pr->res.height);
|
||||
size += PSSO_ModeInfo_sizeof * depths;
|
||||
cnt++;
|
||||
misscnt++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
int k;
|
||||
for (k = 0; k < cnt; k++) {
|
||||
if (newmodes[k].res.width == DisplayModes[i].res.width &&
|
||||
newmodes[k].res.height == DisplayModes[i].res.height &&
|
||||
newmodes[k].depth == DisplayModes[i].depth)
|
||||
break;
|
||||
}
|
||||
if (k >= cnt) {
|
||||
memcpy (&newmodes[cnt], &DisplayModes[i], sizeof (struct PicassoResolution));
|
||||
size += PSSO_ModeInfo_sizeof * depths;
|
||||
cnt++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
qsort (newmodes, cnt, sizeof (struct PicassoResolution), resolution_compare);
|
||||
|
||||
|
||||
#if MULTIDISPLAY
|
||||
for (i = 0; Displays[i].name; i++) {
|
||||
size += PSSO_LibResolution_sizeof;
|
||||
|
||||
@ -1084,7 +1084,7 @@ BEGIN
|
||||
VALUE "FileDescription", "WinUAE"
|
||||
VALUE "FileVersion", "2.4.0.0"
|
||||
VALUE "InternalName", "WinUAE"
|
||||
VALUE "LegalCopyright", "© 1996-2011 under the GNU Public License (GPL)"
|
||||
VALUE "LegalCopyright", "© 1996-2012 under the GNU Public License (GPL)"
|
||||
VALUE "OriginalFilename", "WinUAE.exe"
|
||||
VALUE "ProductName", "WinUAE"
|
||||
VALUE "ProductVersion", "2.4.0.0"
|
||||
|
||||
@ -339,7 +339,7 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
|
||||
|
||||
if (WIN32GFX_IsPicassoScreen ()) {
|
||||
|
||||
full = p->gfx_pfullscreen;
|
||||
full = p->gfx_apmode[1].gfx_fullscreen;
|
||||
sm->lClipTop = -1;
|
||||
sm->lClipLeft = -1;
|
||||
sm->lClipWidth = -1;//picasso96_state.Width;
|
||||
@ -347,7 +347,7 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
|
||||
|
||||
} else {
|
||||
|
||||
full = p->gfx_afullscreen;
|
||||
full = p->gfx_apmode[0].gfx_fullscreen;
|
||||
|
||||
totalhdbl = hres;
|
||||
if (hres > max_horiz_dbl)
|
||||
@ -505,8 +505,8 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
|
||||
}
|
||||
}
|
||||
|
||||
p->gfx_pfullscreen = fs;
|
||||
p->gfx_afullscreen = fs;
|
||||
p->gfx_apmode[1].gfx_fullscreen = fs;
|
||||
p->gfx_apmode[0].gfx_fullscreen = fs;
|
||||
p->win32_rtgscaleifsmall = fs == 2;
|
||||
p->gfx_xcenter_pos = sm->lClipLeft;
|
||||
p->gfx_ycenter_pos = sm->lClipTop;
|
||||
|
||||
@ -203,7 +203,8 @@ void PAL_1x1_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, i
|
||||
pitcht /= sizeof (*trg);
|
||||
|
||||
src = src + pitchs * ys + xs - 2;
|
||||
trg = trg + pitcht * yt + xt;
|
||||
trg = trg + pitcht * yt + xt + 2;
|
||||
|
||||
if (width < 8) {
|
||||
wstart = width;
|
||||
wfast = 0;
|
||||
@ -264,7 +265,7 @@ void PAL_1x1_32(uae_u32 *src, int pitchs, uae_u32 *trg, int pitcht, int width, i
|
||||
|
||||
line = lineptr0;
|
||||
linepre = lineptr1;
|
||||
for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
|
||||
for (x = 0; x < (wfast << 3) + wend + wstart - 2; x++) {
|
||||
|
||||
l = line[0];
|
||||
u = (line[1] + linepre[1]) / 8;
|
||||
@ -303,7 +304,7 @@ void PAL_1x1_16(uae_u16 *src, int pitchs, uae_u16 *trg, int pitcht, int width, i
|
||||
pitcht /= sizeof (*trg);
|
||||
|
||||
src = src + pitchs * ys + xs - 2;
|
||||
trg = trg + pitcht * yt + xt;
|
||||
trg = trg + pitcht * yt + xt + 2;
|
||||
if (width < 8) {
|
||||
wstart = width;
|
||||
wfast = 0;
|
||||
@ -364,7 +365,7 @@ void PAL_1x1_16(uae_u16 *src, int pitchs, uae_u16 *trg, int pitcht, int width, i
|
||||
|
||||
line = lineptr0;
|
||||
linepre = lineptr1;
|
||||
for (x = 0; x < (wfast << 3) + wend + wstart; x++) {
|
||||
for (x = 0; x < (wfast << 3) + wend + wstart - 2; x++) {
|
||||
|
||||
l = line[0];
|
||||
u = (line[1] + linepre[1]) / 8;
|
||||
|
||||
@ -209,8 +209,8 @@ extern int vsynctime_orig;
|
||||
static int avioutput_audio;
|
||||
#endif
|
||||
|
||||
#define ADJUST_LIMIT 7
|
||||
#define ADJUST_LIMIT2 1.5
|
||||
#define ADJUST_LIMIT 6
|
||||
#define ADJUST_LIMIT2 1
|
||||
|
||||
void sound_setadjust (double v)
|
||||
{
|
||||
@ -1870,7 +1870,7 @@ static double sync_sound (double m)
|
||||
double skipmode;
|
||||
if (isvsync () || 1) {
|
||||
|
||||
skipmode = pow (m < 0 ? -m : m, EXPVS) / 8;
|
||||
skipmode = pow (m < 0 ? -m : m, EXPVS) / 9;
|
||||
if (m < 0)
|
||||
skipmode = -skipmode;
|
||||
if (skipmode < -ADJUST_VSSIZE)
|
||||
|
||||
@ -15,12 +15,12 @@
|
||||
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
|
||||
#define GETBDD(x) ((x) % 100)
|
||||
|
||||
#define WINUAEPUBLICBETA 0
|
||||
#define WINUAEPUBLICBETA 1
|
||||
#define LANG_DLL 1
|
||||
|
||||
//#define WINUAEBETA L""
|
||||
#define WINUAEBETA L"Beta 9"
|
||||
#define WINUAEDATE MAKEBD(2011, 12, 30)
|
||||
#define WINUAEBETA L"Beta 10"
|
||||
#define WINUAEDATE MAKEBD(2012, 1, 6)
|
||||
#define WINUAEEXTRA L""
|
||||
#define WINUAEREV L""
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ void getfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height
|
||||
int scalemode = currprefs.gfx_filter_autoscale;
|
||||
|
||||
if (!specialmode && scalemode == AUTOSCALE_STATIC_AUTO) {
|
||||
if (currprefs.gfx_afullscreen) {
|
||||
if (currprefs.gfx_apmode[0].gfx_fullscreen) {
|
||||
scalemode = AUTOSCALE_STATIC_NOMINAL;
|
||||
} else {
|
||||
int w1 = (800 / 2) << currprefs.gfx_resolution;
|
||||
|
||||
@ -135,11 +135,11 @@ int vsync_busy_wait_mode;
|
||||
|
||||
static void vsync_sleep (bool preferbusy)
|
||||
{
|
||||
int bb = picasso_on ? currprefs.gfx_rtg_backbuffers : currprefs.gfx_backbuffers;
|
||||
struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
|
||||
bool dowait;
|
||||
|
||||
if (vsync_busy_wait_mode == 0) {
|
||||
dowait = bb || !preferbusy;
|
||||
dowait = ap->gfx_backbuffers || !preferbusy;
|
||||
} else if (vsync_busy_wait_mode < 0) {
|
||||
dowait = true;
|
||||
} else {
|
||||
@ -196,10 +196,8 @@ static void clearscreen (void)
|
||||
|
||||
static int isfullscreen_2 (struct uae_prefs *p)
|
||||
{
|
||||
if (screen_is_picasso)
|
||||
return p->gfx_pfullscreen == GFX_FULLSCREEN ? 1 : (p->gfx_pfullscreen == GFX_FULLWINDOW ? -1 : 0);
|
||||
else
|
||||
return p->gfx_afullscreen == GFX_FULLSCREEN ? 1 : (p->gfx_afullscreen == GFX_FULLWINDOW ? -1 : 0);
|
||||
int idx = screen_is_picasso ? 1 : 0;
|
||||
return p->gfx_apmode[idx].gfx_fullscreen == GFX_FULLSCREEN ? 1 : (p->gfx_apmode[idx].gfx_fullscreen == GFX_FULLWINDOW ? -1 : 0);
|
||||
}
|
||||
int isfullscreen (void)
|
||||
{
|
||||
@ -848,8 +846,8 @@ bool render_screen (void)
|
||||
|
||||
bool show_screen_maybe (void)
|
||||
{
|
||||
int bb = picasso_on ? currprefs.gfx_rtg_backbuffers : currprefs.gfx_backbuffers;
|
||||
if (!bb)
|
||||
struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
|
||||
if (!ap->gfx_backbuffers)
|
||||
return false;
|
||||
SetEvent (flipevent);
|
||||
return true;
|
||||
@ -1101,7 +1099,7 @@ void gfx_unlock_picasso (void)
|
||||
D3D_unlocktexture ();
|
||||
if (D3D_renderframe ()) {
|
||||
render_ok = true;
|
||||
if (currprefs.gfx_rtg_backbuffers == 0 || isvsync_rtg () >= 0)
|
||||
if (currprefs.gfx_apmode[1].gfx_backbuffers == 0 || isvsync_rtg () >= 0)
|
||||
show_screen ();
|
||||
else
|
||||
SetEvent (flipevent);
|
||||
@ -1201,15 +1199,15 @@ static void update_gfxparams (void)
|
||||
currentmode->current_width = picasso96_state.Width;
|
||||
currentmode->current_height = picasso96_state.Height;
|
||||
currentmode->frequency = abs (currprefs.gfx_refreshrate > default_freq ? currprefs.gfx_refreshrate : default_freq);
|
||||
if (currprefs.gfx_pvsync)
|
||||
currentmode->vsync = 1 + currprefs.gfx_pvsyncmode;
|
||||
if (currprefs.gfx_apmode[1].gfx_vsync)
|
||||
currentmode->vsync = 1 + currprefs.gfx_apmode[1].gfx_vsyncmode;
|
||||
} else {
|
||||
#endif
|
||||
currentmode->current_width = currprefs.gfx_size.width;
|
||||
currentmode->current_height = currprefs.gfx_size.height;
|
||||
currentmode->frequency = abs (currprefs.gfx_refreshrate);
|
||||
if (currprefs.gfx_avsync)
|
||||
currentmode->vsync = 1 + currprefs.gfx_avsyncmode;
|
||||
if (currprefs.gfx_apmode[0].gfx_vsync)
|
||||
currentmode->vsync = 1 + currprefs.gfx_apmode[0].gfx_vsyncmode;
|
||||
#ifdef PICASSO96
|
||||
}
|
||||
#endif
|
||||
@ -1331,12 +1329,12 @@ int check_prefs_changed_gfx (void)
|
||||
c |= currprefs.gfx_size_win.y != changed_prefs.gfx_size_win.y ? 16 : 0;
|
||||
#endif
|
||||
c |= currprefs.color_mode != changed_prefs.color_mode ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_afullscreen != changed_prefs.gfx_afullscreen ? 16 : 0;
|
||||
c |= currprefs.gfx_pfullscreen != changed_prefs.gfx_pfullscreen ? 16 : 0;
|
||||
c |= currprefs.gfx_avsync != changed_prefs.gfx_avsync ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_pvsync != changed_prefs.gfx_pvsync ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_avsyncmode != changed_prefs.gfx_avsyncmode ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_pvsyncmode != changed_prefs.gfx_pvsyncmode ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_apmode[0].gfx_fullscreen != changed_prefs.gfx_apmode[0].gfx_fullscreen ? 16 : 0;
|
||||
c |= currprefs.gfx_apmode[1].gfx_fullscreen != changed_prefs.gfx_apmode[1].gfx_fullscreen ? 16 : 0;
|
||||
c |= currprefs.gfx_apmode[0].gfx_vsync != changed_prefs.gfx_apmode[0].gfx_vsync ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_apmode[1].gfx_vsync != changed_prefs.gfx_apmode[1].gfx_vsync ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_apmode[0].gfx_vsyncmode != changed_prefs.gfx_apmode[0].gfx_vsyncmode ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_apmode[1].gfx_vsyncmode != changed_prefs.gfx_apmode[1].gfx_vsyncmode ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_refreshrate != changed_prefs.gfx_refreshrate ? 2 | 16 : 0;
|
||||
c |= currprefs.gfx_autoresolution != changed_prefs.gfx_autoresolution ? (2|8|16) : 0;
|
||||
c |= currprefs.gfx_api != changed_prefs.gfx_api ? (1|8|32) : 0;
|
||||
@ -1371,8 +1369,8 @@ int check_prefs_changed_gfx (void)
|
||||
c |= currprefs.gfx_display != changed_prefs.gfx_display ? (2|4|8) : 0;
|
||||
c |= _tcscmp (currprefs.gfx_display_name, changed_prefs.gfx_display_name) ? (2|4|8) : 0;
|
||||
c |= currprefs.gfx_blackerthanblack != changed_prefs.gfx_blackerthanblack ? (2 | 8) : 0;
|
||||
c |= currprefs.gfx_backbuffers != changed_prefs.gfx_backbuffers ? (2 | 8) : 0;
|
||||
c |= currprefs.gfx_rtg_backbuffers != changed_prefs.gfx_rtg_backbuffers ? (2 | 8) : 0;
|
||||
c |= currprefs.gfx_apmode[0].gfx_backbuffers != changed_prefs.gfx_apmode[0].gfx_backbuffers ? (2 | 8) : 0;
|
||||
c |= currprefs.gfx_apmode[1].gfx_backbuffers != changed_prefs.gfx_apmode[1].gfx_backbuffers ? (2 | 8) : 0;
|
||||
|
||||
c |= currprefs.win32_alwaysontop != changed_prefs.win32_alwaysontop ? 32 : 0;
|
||||
c |= currprefs.win32_notaskbarbutton != changed_prefs.win32_notaskbarbutton ? 32 : 0;
|
||||
@ -1387,15 +1385,15 @@ int check_prefs_changed_gfx (void)
|
||||
if (display_change_requested || c)
|
||||
{
|
||||
int keepfsmode =
|
||||
currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen &&
|
||||
currprefs.gfx_pfullscreen == changed_prefs.gfx_pfullscreen;
|
||||
currprefs.gfx_apmode[0].gfx_fullscreen == changed_prefs.gfx_apmode[0].gfx_fullscreen &&
|
||||
currprefs.gfx_apmode[1].gfx_fullscreen == changed_prefs.gfx_apmode[1].gfx_fullscreen;
|
||||
cfgfile_configuration_change (1);
|
||||
|
||||
currprefs.gfx_autoresolution = changed_prefs.gfx_autoresolution;
|
||||
currprefs.color_mode = changed_prefs.color_mode;
|
||||
currprefs.gfx_api = changed_prefs.gfx_api;
|
||||
|
||||
if (changed_prefs.gfx_afullscreen == GFX_FULLSCREEN) {
|
||||
if (changed_prefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN) {
|
||||
if (currprefs.gfx_api != changed_prefs.gfx_api)
|
||||
display_change_requested = 1;
|
||||
}
|
||||
@ -1437,8 +1435,8 @@ int check_prefs_changed_gfx (void)
|
||||
currprefs.gfx_display = changed_prefs.gfx_display;
|
||||
_tcscpy (currprefs.gfx_display_name, changed_prefs.gfx_display_name);
|
||||
currprefs.gfx_blackerthanblack = changed_prefs.gfx_blackerthanblack;
|
||||
currprefs.gfx_backbuffers = changed_prefs.gfx_backbuffers;
|
||||
currprefs.gfx_rtg_backbuffers = changed_prefs.gfx_rtg_backbuffers;
|
||||
currprefs.gfx_apmode[0].gfx_backbuffers = changed_prefs.gfx_apmode[0].gfx_backbuffers;
|
||||
currprefs.gfx_apmode[1].gfx_backbuffers = changed_prefs.gfx_apmode[1].gfx_backbuffers;
|
||||
|
||||
currprefs.win32_alwaysontop = changed_prefs.win32_alwaysontop;
|
||||
currprefs.win32_notaskbarbutton = changed_prefs.win32_notaskbarbutton;
|
||||
@ -1731,31 +1729,30 @@ static void open_screen (void)
|
||||
|
||||
static int ifs (struct uae_prefs *p)
|
||||
{
|
||||
if (screen_is_picasso)
|
||||
return p->gfx_pfullscreen == GFX_FULLSCREEN ? 1 : (p->gfx_pfullscreen == GFX_FULLWINDOW ? -1 : 0);
|
||||
else
|
||||
return p->gfx_afullscreen == GFX_FULLSCREEN ? 1 : (p->gfx_afullscreen == GFX_FULLWINDOW ? -1 : 0);
|
||||
int idx = screen_is_picasso ? 1 : 0;
|
||||
return p->gfx_apmode[idx].gfx_fullscreen == GFX_FULLSCREEN ? 1 : (p->gfx_apmode[idx].gfx_fullscreen == GFX_FULLWINDOW ? -1 : 0);
|
||||
}
|
||||
|
||||
static int reopen (int full)
|
||||
{
|
||||
int quick = 0;
|
||||
int idx = screen_is_picasso ? 1 : 0;
|
||||
|
||||
updatewinfsmode (&changed_prefs);
|
||||
|
||||
if (changed_prefs.gfx_afullscreen != currprefs.gfx_afullscreen && !screen_is_picasso)
|
||||
if (changed_prefs.gfx_apmode[0].gfx_fullscreen != currprefs.gfx_apmode[0].gfx_fullscreen && !screen_is_picasso)
|
||||
full = 1;
|
||||
if (changed_prefs.gfx_pfullscreen != currprefs.gfx_pfullscreen && screen_is_picasso)
|
||||
if (changed_prefs.gfx_apmode[1].gfx_fullscreen != currprefs.gfx_apmode[1].gfx_fullscreen && screen_is_picasso)
|
||||
full = 1;
|
||||
|
||||
/* fullscreen to fullscreen? */
|
||||
if (isfullscreen () > 0 && currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen &&
|
||||
currprefs.gfx_pfullscreen == changed_prefs.gfx_pfullscreen && currprefs.gfx_afullscreen == GFX_FULLSCREEN) {
|
||||
if (isfullscreen () > 0 && currprefs.gfx_apmode[0].gfx_fullscreen == changed_prefs.gfx_apmode[0].gfx_fullscreen &&
|
||||
currprefs.gfx_apmode[1].gfx_fullscreen == changed_prefs.gfx_apmode[1].gfx_fullscreen && currprefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN) {
|
||||
quick = 1;
|
||||
}
|
||||
/* windowed to windowed */
|
||||
if (isfullscreen () <= 0 && currprefs.gfx_afullscreen == changed_prefs.gfx_afullscreen &&
|
||||
currprefs.gfx_pfullscreen == changed_prefs.gfx_pfullscreen) {
|
||||
if (isfullscreen () <= 0 && currprefs.gfx_apmode[0].gfx_fullscreen == changed_prefs.gfx_apmode[0].gfx_fullscreen &&
|
||||
currprefs.gfx_apmode[1].gfx_fullscreen == changed_prefs.gfx_apmode[1].gfx_fullscreen) {
|
||||
quick = 1;
|
||||
}
|
||||
|
||||
@ -1765,12 +1762,12 @@ static int reopen (int full)
|
||||
currprefs.gfx_size_win.height = changed_prefs.gfx_size_win.height;
|
||||
currprefs.gfx_size_win.x = changed_prefs.gfx_size_win.x;
|
||||
currprefs.gfx_size_win.y = changed_prefs.gfx_size_win.y;
|
||||
currprefs.gfx_afullscreen = changed_prefs.gfx_afullscreen;
|
||||
currprefs.gfx_pfullscreen = changed_prefs.gfx_pfullscreen;
|
||||
currprefs.gfx_avsync = changed_prefs.gfx_avsync;
|
||||
currprefs.gfx_pvsync = changed_prefs.gfx_pvsync;
|
||||
currprefs.gfx_avsyncmode = changed_prefs.gfx_avsyncmode;
|
||||
currprefs.gfx_pvsyncmode = changed_prefs.gfx_pvsyncmode;
|
||||
currprefs.gfx_apmode[0].gfx_fullscreen = changed_prefs.gfx_apmode[0].gfx_fullscreen;
|
||||
currprefs.gfx_apmode[1].gfx_fullscreen = changed_prefs.gfx_apmode[1].gfx_fullscreen;
|
||||
currprefs.gfx_apmode[0].gfx_vsync = changed_prefs.gfx_apmode[0].gfx_vsync;
|
||||
currprefs.gfx_apmode[1].gfx_vsync = changed_prefs.gfx_apmode[1].gfx_vsync;
|
||||
currprefs.gfx_apmode[0].gfx_vsyncmode = changed_prefs.gfx_apmode[0].gfx_vsyncmode;
|
||||
currprefs.gfx_apmode[1].gfx_vsyncmode = changed_prefs.gfx_apmode[1].gfx_vsyncmode;
|
||||
currprefs.gfx_refreshrate = changed_prefs.gfx_refreshrate;
|
||||
config_changed = 1;
|
||||
|
||||
@ -1819,8 +1816,8 @@ bool vsync_switchmode (int hz)
|
||||
oldmode = found;
|
||||
oldhz = hz;
|
||||
if (!found) {
|
||||
changed_prefs.gfx_avsync = 0;
|
||||
if (currprefs.gfx_avsync != changed_prefs.gfx_avsync) {
|
||||
changed_prefs.gfx_apmode[0].gfx_vsync = 0;
|
||||
if (currprefs.gfx_apmode[0].gfx_vsync != changed_prefs.gfx_apmode[0].gfx_vsync) {
|
||||
config_changed = 1;
|
||||
}
|
||||
write_log (L"refresh rate changed to %d but no matching screenmode found, vsync disabled\n", hz);
|
||||
@ -1902,7 +1899,7 @@ void gfx_set_picasso_state (int on)
|
||||
updatemodes ();
|
||||
update_gfxparams ();
|
||||
clearscreen ();
|
||||
if (currprefs.gfx_afullscreen != currprefs.gfx_pfullscreen || (currprefs.gfx_afullscreen == GFX_FULLSCREEN && currprefs.gfx_api)) {
|
||||
if (currprefs.gfx_apmode[0].gfx_fullscreen != currprefs.gfx_apmode[1].gfx_fullscreen || (currprefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN && currprefs.gfx_api)) {
|
||||
mode = 1;
|
||||
} else {
|
||||
mode = modeswitchneeded (&wc);
|
||||
@ -2358,7 +2355,7 @@ static unsigned int __stdcall vblankthread (void *dummy)
|
||||
vblank_found = true;
|
||||
if (isvsync_chipset () < 0) {
|
||||
vblank_found_chipset = true;
|
||||
if (!currprefs.gfx_backbuffers)
|
||||
if (!currprefs.gfx_apmode[0].gfx_backbuffers)
|
||||
show_screen ();
|
||||
} else if (isvsync_rtg () < 0) {
|
||||
vblank_found_rtg = true;
|
||||
@ -2373,7 +2370,7 @@ static unsigned int __stdcall vblankthread (void *dummy)
|
||||
}
|
||||
if (t - vblank_prev_time > vblankbasefull * 3)
|
||||
vblankthread_mode = VBLANKTH_IDLE;
|
||||
if (!donotwait || currprefs.gfx_backbuffers || picasso_on)
|
||||
if (!donotwait || currprefs.gfx_apmode[0].gfx_backbuffers || picasso_on)
|
||||
sleep_millis (1);
|
||||
} else {
|
||||
break;
|
||||
@ -2511,6 +2508,7 @@ double vblank_calibrate (double approx_vblank, bool waitonly)
|
||||
int width, height, depth, rate, mode;
|
||||
struct remembered_vsync *rv;
|
||||
double rval = -1;
|
||||
struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
|
||||
|
||||
if (picasso_on) {
|
||||
width = picasso96_state.Width;
|
||||
@ -2638,7 +2636,7 @@ double vblank_calibrate (double approx_vblank, bool waitonly)
|
||||
return tsum;
|
||||
fail:
|
||||
write_log (L"VSync calibration failed\n");
|
||||
changed_prefs.gfx_avsync = 0;
|
||||
ap->gfx_vsync = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -2944,9 +2942,9 @@ static BOOL doInit (void)
|
||||
|
||||
remembered_vblank = -1;
|
||||
if (wasfullwindow_a == 0)
|
||||
wasfullwindow_a = currprefs.gfx_afullscreen == GFX_FULLWINDOW ? 1 : -1;
|
||||
wasfullwindow_a = currprefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLWINDOW ? 1 : -1;
|
||||
if (wasfullwindow_p == 0)
|
||||
wasfullwindow_p = currprefs.gfx_pfullscreen == GFX_FULLWINDOW ? 1 : -1;
|
||||
wasfullwindow_p = currprefs.gfx_apmode[1].gfx_fullscreen == GFX_FULLWINDOW ? 1 : -1;
|
||||
gfxmode_reset ();
|
||||
|
||||
for (;;) {
|
||||
@ -2983,9 +2981,9 @@ static BOOL doInit (void)
|
||||
gui_message (tmpstr);
|
||||
DirectDraw_Start ();
|
||||
if (screen_is_picasso)
|
||||
changed_prefs.gfx_pfullscreen = currprefs.gfx_pfullscreen = GFX_FULLSCREEN;
|
||||
changed_prefs.gfx_apmode[1].gfx_fullscreen = currprefs.gfx_apmode[1].gfx_fullscreen = GFX_FULLSCREEN;
|
||||
else
|
||||
changed_prefs.gfx_afullscreen = currprefs.gfx_afullscreen = GFX_FULLSCREEN;
|
||||
changed_prefs.gfx_apmode[0].gfx_fullscreen = currprefs.gfx_apmode[0].gfx_fullscreen = GFX_FULLSCREEN;
|
||||
updatewinfsmode (&currprefs);
|
||||
updatewinfsmode (&changed_prefs);
|
||||
currentmode->current_depth = tmp_depth;
|
||||
@ -3185,7 +3183,7 @@ void updatewinfsmode (struct uae_prefs *p)
|
||||
|
||||
void toggle_fullscreen (int mode)
|
||||
{
|
||||
int *p = picasso_on ? &changed_prefs.gfx_pfullscreen : &changed_prefs.gfx_afullscreen;
|
||||
int *p = picasso_on ? &changed_prefs.gfx_apmode[1].gfx_fullscreen : &changed_prefs.gfx_apmode[0].gfx_fullscreen;
|
||||
int wfw = picasso_on ? wasfullwindow_p : wasfullwindow_a;
|
||||
int v = *p;
|
||||
|
||||
|
||||
@ -1797,11 +1797,11 @@ void gui_display (int shortcut)
|
||||
setmouseactive (0);
|
||||
|
||||
w = h = -1;
|
||||
if (!WIN32GFX_IsPicassoScreen () && currprefs.gfx_afullscreen && (currprefs.gfx_size.width < gui_width || currprefs.gfx_size.height < gui_height)) {
|
||||
if (!WIN32GFX_IsPicassoScreen () && currprefs.gfx_apmode[0].gfx_fullscreen && (currprefs.gfx_size.width < gui_width || currprefs.gfx_size.height < gui_height)) {
|
||||
w = currprefs.gfx_size.width;
|
||||
h = currprefs.gfx_size.height;
|
||||
}
|
||||
if (WIN32GFX_IsPicassoScreen () && currprefs.gfx_pfullscreen && (picasso96_state.Width < gui_width || picasso96_state.Height < gui_height)) {
|
||||
if (WIN32GFX_IsPicassoScreen () && currprefs.gfx_apmode[1].gfx_fullscreen && (picasso96_state.Width < gui_width || picasso96_state.Height < gui_height)) {
|
||||
w = currprefs.gfx_size.width;
|
||||
h = currprefs.gfx_size.height;
|
||||
}
|
||||
@ -5486,7 +5486,7 @@ static void init_display_mode (HWND hDlg)
|
||||
break;
|
||||
}
|
||||
|
||||
if (workprefs.gfx_afullscreen) {
|
||||
if (workprefs.gfx_apmode[0].gfx_fullscreen) {
|
||||
d2 = d;
|
||||
if ((index = WIN32GFX_AdjustScreenmode (md, &workprefs.gfx_size_fs.width, &workprefs.gfx_size_fs.height, &d2)) >= 0) {
|
||||
switch (d2)
|
||||
@ -5653,23 +5653,21 @@ static void values_to_displaydlg (HWND hDlg)
|
||||
WIN32GUI_LoadUIString(IDS_SCREEN_FULLWINDOW, buffer, sizeof buffer / sizeof (TCHAR));
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
|
||||
|
||||
WIN32GUI_LoadUIString(IDS_SCREEN_VSYNC_NONE, buffer, sizeof buffer / sizeof (TCHAR));
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE2, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
WIN32GUI_LoadUIString(IDS_SCREEN_VSYNC2, buffer, sizeof buffer / sizeof (TCHAR));
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE2, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
WIN32GUI_LoadUIString(IDS_SCREEN_VSYNC2_AUTOSWITCH, buffer, sizeof buffer / sizeof (TCHAR));
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE2, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
#if 1
|
||||
WIN32GUI_LoadUIString(IDS_SCREEN_VSYNC, buffer, sizeof buffer / sizeof (TCHAR));
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE2, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
WIN32GUI_LoadUIString(IDS_SCREEN_VSYNC_AUTOSWITCH, buffer, sizeof buffer / sizeof (TCHAR));
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE2, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
#endif
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE, CB_SETCURSEL,
|
||||
workprefs.gfx_afullscreen, 0);
|
||||
workprefs.gfx_apmode[0].gfx_fullscreen, 0);
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_NATIVE2, CB_SETCURSEL,
|
||||
workprefs.gfx_avsync + (workprefs.gfx_avsyncmode || !workprefs.gfx_avsync ? 0 : 2), 0);
|
||||
workprefs.gfx_apmode[0].gfx_vsync + (workprefs.gfx_apmode[0].gfx_vsyncmode || !workprefs.gfx_apmode[0].gfx_vsync ? 0 : 2), 0);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_RTG, CB_RESETCONTENT, 0, 0);
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_RTG2, CB_RESETCONTENT, 0, 0);
|
||||
@ -5695,9 +5693,9 @@ static void values_to_displaydlg (HWND hDlg)
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_RTG2, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
#endif
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_RTG, CB_SETCURSEL,
|
||||
workprefs.gfx_pfullscreen, 0);
|
||||
workprefs.gfx_apmode[1].gfx_fullscreen, 0);
|
||||
SendDlgItemMessage(hDlg, IDC_SCREENMODE_RTG2, CB_SETCURSEL,
|
||||
workprefs.gfx_pvsync, 0);
|
||||
workprefs.gfx_apmode[1].gfx_vsync, 0);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_LORES, CB_RESETCONTENT, 0, 0);
|
||||
WIN32GUI_LoadUIString(IDS_RES_LORES, buffer, sizeof buffer / sizeof (TCHAR));
|
||||
@ -5724,7 +5722,7 @@ static void values_to_displaydlg (HWND hDlg)
|
||||
SendDlgItemMessage(hDlg, IDC_DISPLAY_BUFFERCNT, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
WIN32GUI_LoadUIString(IDS_BUFFER_TRIPLE, buffer, sizeof buffer / sizeof (TCHAR));
|
||||
SendDlgItemMessage(hDlg, IDC_DISPLAY_BUFFERCNT, CB_ADDSTRING, 0, (LPARAM)buffer);
|
||||
SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_SETCURSEL, workprefs.gfx_backbuffers, 0);
|
||||
SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_SETCURSEL, workprefs.gfx_apmode[0].gfx_backbuffers, 0);
|
||||
|
||||
init_da (hDlg);
|
||||
}
|
||||
@ -5827,33 +5825,33 @@ static void values_from_displaydlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
|
||||
LRESULT posn;
|
||||
TCHAR tmp[200];
|
||||
|
||||
workprefs.gfx_afullscreen = SendDlgItemMessage (hDlg, IDC_SCREENMODE_NATIVE, CB_GETCURSEL, 0, 0);
|
||||
workprefs.gfx_apmode[0].gfx_fullscreen = SendDlgItemMessage (hDlg, IDC_SCREENMODE_NATIVE, CB_GETCURSEL, 0, 0);
|
||||
workprefs.gfx_lores_mode = ischecked (hDlg, IDC_LORES_SMOOTHED);
|
||||
workprefs.gfx_scandoubler = ischecked (hDlg, IDC_FLICKERFIXER);
|
||||
workprefs.gfx_blackerthanblack = ischecked (hDlg, IDC_BLACKER_THAN_BLACK);
|
||||
workprefs.gfx_vresolution = (ischecked (hDlg, IDC_LM_DOUBLED) || ischecked (hDlg, IDC_LM_SCANLINES)) ? VRES_DOUBLE : VRES_NONDOUBLE;
|
||||
workprefs.gfx_scanlines = ischecked (hDlg, IDC_LM_SCANLINES);
|
||||
workprefs.gfx_backbuffers = SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_GETCURSEL, 0, 0);
|
||||
workprefs.gfx_apmode[0].gfx_backbuffers = SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_GETCURSEL, 0, 0);
|
||||
workprefs.gfx_framerate = SendDlgItemMessage (hDlg, IDC_FRAMERATE, TBM_GETPOS, 0, 0);
|
||||
|
||||
i = SendDlgItemMessage (hDlg, IDC_SCREENMODE_NATIVE2, CB_GETCURSEL, 0, 0);
|
||||
int oldmode = workprefs.gfx_avsyncmode;
|
||||
workprefs.gfx_avsync = 0;
|
||||
workprefs.gfx_avsyncmode = 0;
|
||||
int oldmode = workprefs.gfx_apmode[0].gfx_vsyncmode;
|
||||
workprefs.gfx_apmode[0].gfx_vsync = 0;
|
||||
workprefs.gfx_apmode[0].gfx_vsyncmode = 0;
|
||||
if (i > 0) {
|
||||
i--;
|
||||
workprefs.gfx_avsync = (i & 1) + 1;
|
||||
workprefs.gfx_avsyncmode = (i < 2) ? 1 : 0;
|
||||
workprefs.gfx_apmode[0].gfx_vsync = (i & 1) + 1;
|
||||
workprefs.gfx_apmode[0].gfx_vsyncmode = (i < 2) ? 1 : 0;
|
||||
}
|
||||
|
||||
workprefs.gfx_pfullscreen = SendDlgItemMessage (hDlg, IDC_SCREENMODE_RTG, CB_GETCURSEL, 0, 0);
|
||||
workprefs.gfx_apmode[1].gfx_fullscreen = SendDlgItemMessage (hDlg, IDC_SCREENMODE_RTG, CB_GETCURSEL, 0, 0);
|
||||
i = SendDlgItemMessage (hDlg, IDC_SCREENMODE_RTG2, CB_GETCURSEL, 0, 0);
|
||||
workprefs.gfx_pvsync = 0;
|
||||
workprefs.gfx_pvsyncmode = 0;
|
||||
workprefs.gfx_apmode[1].gfx_vsync = 0;
|
||||
workprefs.gfx_apmode[1].gfx_vsyncmode = 0;
|
||||
if (i > 0) {
|
||||
i--;
|
||||
workprefs.gfx_pvsync = (i & 1) + 1;
|
||||
workprefs.gfx_pvsyncmode = 1;
|
||||
workprefs.gfx_apmode[1].gfx_vsync = (i & 1) + 1;
|
||||
workprefs.gfx_apmode[1].gfx_vsyncmode = 1;
|
||||
}
|
||||
|
||||
bool updaterate = false, updateslider = false;
|
||||
|
||||
@ -1,4 +1,24 @@
|
||||
|
||||
Beta 10:
|
||||
|
||||
- RTG mode list should always list all monitors' supported resolutions.
|
||||
- PAL filter display positioning is now same as other filters.
|
||||
- Removed obsolete right control key hack, Amiga does not have right control key, it was only originally
|
||||
needed to handle keyboard layout B in old UAE versions.
|
||||
- Cycle-exact mode and very heavy interrupt activity caused lost internal interrupt event in some very rare
|
||||
situations, bug introduced long time ago. (Guardian Dragon II / Kefrens random hang, probably others too)
|
||||
- In non-vsync modes only triple buffering enables vsynced page flipping, other modes flip instantly
|
||||
for better performance (and possibly introduces tearing but it is better than bad performance)
|
||||
- Log more complete RDB dump when mounting RDB hardfile or real harddrive using UAE controller.
|
||||
- bsdsocket emulation tweaks. SocketBaseTagList() more compatible with AmiTCP (emulate weird behavior of
|
||||
breaking tag list processing if unknown tag detected, some programs actually don't even have a TAG_END..),
|
||||
get/setsockopt more compatible ("Unknown optlen (1)" log error messages) Convert SO_SNDTIMEO and
|
||||
SO_RCVTIMEO time values between milliseconds and struct timeval.
|
||||
- HID input stuck button fixed if multiple buttons were kept pressed while releasing another button.
|
||||
- HID input configuration loading didn't always match devices correctly
|
||||
|
||||
Beta 9:
|
||||
|
||||
- USB HID game controller support really works now. (HID signed value handling is a bit special)
|
||||
Also added pad quirks list from Linux, some game pads apparently report bad minimum and maximum range
|
||||
values, this also includes Logitech G13 stick which was not listed (reported range is -127 to 127,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user