From 3a0b58f14e8298dbd1fefe780b4892eabd2a61cd Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Tue, 8 Jan 2008 07:17:22 +0000 Subject: [PATCH] Fixed winwork to use proper tchar functions for getenv. --- src/osd/windows/winwork.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/osd/windows/winwork.c b/src/osd/windows/winwork.c index 7dae45accc2..5655f874f45 100644 --- a/src/osd/windows/winwork.c +++ b/src/osd/windows/winwork.c @@ -12,6 +12,7 @@ #define WIN32_LEAN_AND_MEAN #include #include +#include #ifdef __GNUC__ #include @@ -625,13 +626,13 @@ void osd_work_item_release(osd_work_item *item) static int effective_num_processors(void) { - char *procsoverride; + TCHAR *procsoverride; SYSTEM_INFO info; int numprocs = 0; // if the OSDPROCESSORS environment variable is set, use that value if valid - procsoverride = getenv("OSDPROCESSORS"); - if (procsoverride != NULL && sscanf(procsoverride, "%d", &numprocs) == 1 && numprocs > 0) + procsoverride = _tgetenv(_T("OSDPROCESSORS")); + if (procsoverride != NULL && _stscanf(procsoverride, _T("%d"), &numprocs) == 1 && numprocs > 0) return numprocs; // otherwise, fetch the info from the system