Fixed the setting of nvr_path, NVR's with CMOS settings now get saved again;
Added pclog_w which is the Unicode version of pclog, used in disc.c for logging when a floppy image could not be loaded.
This commit is contained in:
@@ -127,7 +127,7 @@ void disc_load(int drive, wchar_t *fn)
|
|||||||
}
|
}
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
pclog("Couldn't load %s %s\n",fn,p);
|
pclog_w(L"Couldn't load %s %s\n",fn,p);
|
||||||
drive_empty[drive] = 1;
|
drive_empty[drive] = 1;
|
||||||
fdd_set_head(real_drive(drive), 0);
|
fdd_set_head(real_drive(drive), 0);
|
||||||
discfns[drive][0] = L'\0';
|
discfns[drive][0] = L'\0';
|
||||||
|
@@ -664,6 +664,7 @@ extern uint32_t SCSIGetCDChannel(int channel);
|
|||||||
extern int ui_writeprot[4];
|
extern int ui_writeprot[4];
|
||||||
|
|
||||||
void pclog(const char *format, ...);
|
void pclog(const char *format, ...);
|
||||||
|
void pclog_w(const wchar_t *format, ...);
|
||||||
extern int nmi;
|
extern int nmi;
|
||||||
extern int nmi_auto_clear;
|
extern int nmi_auto_clear;
|
||||||
|
|
||||||
|
17
src/pc.c
17
src/pc.c
@@ -115,6 +115,17 @@ void pclog(const char *format, ...)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pclog_w(const wchar_t *format, ...)
|
||||||
|
{
|
||||||
|
#ifndef RELEASE_BUILD
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, format);
|
||||||
|
_vwprintf_p(format, ap);
|
||||||
|
va_end(ap);
|
||||||
|
fflush(stdout);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef __unix
|
#ifndef __unix
|
||||||
#ifndef _LIBC
|
#ifndef _LIBC
|
||||||
# define __builtin_expect(expr, val) (expr)
|
# define __builtin_expect(expr, val) (expr)
|
||||||
@@ -705,7 +716,7 @@ void loadconfig(wchar_t *fn)
|
|||||||
int c, d;
|
int c, d;
|
||||||
char s[512];
|
char s[512];
|
||||||
char *p;
|
char *p;
|
||||||
WCHAR *wp, *wq;
|
wchar_t *wp, *wq;
|
||||||
char temps[512];
|
char temps[512];
|
||||||
|
|
||||||
if (!fn)
|
if (!fn)
|
||||||
@@ -920,9 +931,9 @@ void loadconfig(wchar_t *fn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset(nvr_path, 0, 2048);
|
memset(nvr_path, 0, 2048);
|
||||||
wp = (char *)config_get_wstring(NULL, "nvr_path", "nvr");
|
wp = (wchar_t *)config_get_wstring(NULL, "nvr_path", L"nvr");
|
||||||
if (wp) {
|
if (wp) {
|
||||||
if (strlen(wp) <= 992) wcscpy(nvr_path, wp);
|
if (wcslen(wp) <= 992) wcscpy(nvr_path, wp);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
append_filename_w(nvr_path, pcempath, L"nvr", 511);
|
append_filename_w(nvr_path, pcempath, L"nvr", 511);
|
||||||
|
Reference in New Issue
Block a user