This should fix problems with non-ASCII filenames for Win32, and 0-sized files contained in archived files should not cause loading valid roms to fail anymore.
This commit is contained in:
parent
317c56ba9d
commit
f5f30838f9
|
@ -449,7 +449,7 @@ ArchiveScanRecord FCEUD_ScanArchive(std::string fname)
|
||||||
PROPVARIANT prop;
|
PROPVARIANT prop;
|
||||||
prop.vt = VT_EMPTY;
|
prop.vt = VT_EMPTY;
|
||||||
|
|
||||||
if (FAILED(object->GetProperty( i, kpidSize, &prop )) || prop.vt != VT_UI8 || !prop.uhVal.LowPart || prop.uhVal.HighPart)
|
if (FAILED(object->GetProperty( i, kpidSize, &prop )) || prop.vt != VT_UI8 /*|| !prop.uhVal.LowPart*/ || prop.uhVal.HighPart)
|
||||||
goto bomb;
|
goto bomb;
|
||||||
|
|
||||||
item.size = prop.uhVal.LowPart;
|
item.size = prop.uhVal.LowPart;
|
||||||
|
|
|
@ -630,6 +630,21 @@ static BOOL CALLBACK EnumCallbackFCEUXInstantiated(HWND hWnd, LPARAM lParam)
|
||||||
#include "x6502.h"
|
#include "x6502.h"
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
#ifdef MULTITHREAD_STDLOCALE_WORKAROUND
|
||||||
|
// Note: there's a known threading bug regarding std::locale with MSVC according to
|
||||||
|
// http://connect.microsoft.com/VisualStudio/feedback/details/492128/std-locale-constructor-modifies-global-locale-via-setlocale
|
||||||
|
int iPreviousFlag = ::_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
|
||||||
|
#endif
|
||||||
|
using std::locale;
|
||||||
|
locale::global(locale(locale::classic(), "", locale::collate | locale::ctype));
|
||||||
|
|
||||||
|
#ifdef MULTITHREAD_STDLOCALE_WORKAROUND
|
||||||
|
if (iPreviousFlag > 0 )
|
||||||
|
::_configthreadlocale(iPreviousFlag);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
SetThreadAffinityMask(GetCurrentThread(),1);
|
SetThreadAffinityMask(GetCurrentThread(),1);
|
||||||
|
|
||||||
printf("%08x",opsize);
|
printf("%08x",opsize);
|
||||||
|
|
Loading…
Reference in New Issue