p->win32_commandpathend[0] = 0;
p->win32_statusbar = 1;
p->gfx_api = os_win7 ? 2 : (os_vista ? 1 : 0);
+ if (p->gfx_api > 1)
+ p->color_mode = 5;
if (p->gf[APMODE_NATIVE].gfx_filter == 0 && p->gfx_api)
p->gf[APMODE_NATIVE].gfx_filter = 1;
if (p->gf[APMODE_RTG].gfx_filter == 0 && p->gfx_api)
vsdetect++;
}
if (vsdetect >= detectcnt / 2) {
- write_log (L"Forced vsync detected, switching to double buffered\n");
+ write_log (_T("Forced vsync detected, switching to double buffered\n"));
changed_prefs.gfx_apmode[0].gfx_backbuffers = 1;
}
}
int tmp_depth;
int ret = 0;
+retry:
remembered_vblank = -1;
if (wasfullwindow_a == 0)
wasfullwindow_a = currprefs.gfx_apmode[0].gfx_fullscreen == GFX_FULLWINDOW ? 1 : -1;
if (err) {
if (currprefs.gfx_api == 2) {
D3D_free(true);
+ if (err[0] == 0 && currprefs.color_mode != 5) {
+ changed_prefs.color_mode = currprefs.color_mode = 5;
+ update_gfxparams();
+ goto retry;
+ }
changed_prefs.gfx_api = currprefs.gfx_api = 1;
d3d_select(&currprefs);
error_log(_T("Direct3D11 failed to initialize, falling back to Direct3D9."));