2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Fix some minGW bugs.

This commit is contained in:
Darryl Pogue
2012-02-04 19:16:50 -08:00
parent 8416c8ed42
commit d39a8ab298
6 changed files with 11 additions and 8 deletions

View File

@ -119,7 +119,7 @@ const wchar_t * ProductLongName () {
//============================================================================
void ProductString (wchar_t * dest, unsigned destChars) {
// Example: "UruLive.2.214 - External.Release"
swprintf(
hsSnwprintf(
dest,
destChars,
L"%s.%u.%u - %s.%s",

View File

@ -23,6 +23,7 @@ set(pnSceneObject_SOURCES
)
add_library(pnSceneObject STATIC ${pnSceneObject_HEADERS} ${pnSceneObject_SOURCES})
target_link_libraries(pnSceneObject CoreLib pnKeyedObject pnNetCommon)
source_group("Header Files" FILES ${pnSceneObject_HEADERS})
source_group("Source Files" FILES ${pnSceneObject_SOURCES})

View File

@ -141,6 +141,7 @@ void CpuGetInfo (
uint32_t flags[2] = { 0, 0 };
cpuVendor[0] = 0;
#ifdef _MSC_VER
_asm {
// Detect if cpuid instruction is supported by attempting
// to change the ID bit of EFLAGS
@ -187,6 +188,7 @@ void CpuGetInfo (
DONE:
}
#endif
// Decode capability flags
const static struct CpuCap {

View File

@ -16,7 +16,7 @@ set(plStatusLog_HEADERS
)
add_library(plStatusLog STATIC ${plStatusLog_SOURCES} ${plStatusLog_HEADERS})
target_link_libraries(plStatusLog CoreLib plFile plUnifiedTime)
target_link_libraries(plStatusLog CoreLib plFile plUnifiedTime pnProduct)
source_group("Source Files" FILES ${plStatusLog_SOURCES})
source_group("Header Files" FILES ${plStatusLog_HEADERS})

View File

@ -480,15 +480,15 @@ bool plStatusLog::IReOpen( void )
ext = L".elf";
#endif
wchar_t fileToOpen[MAX_PATH];
swprintf(fileToOpen, MAX_PATH, L"%s.0%s", fileNoExt, ext);
hsSnwprintf(fileToOpen, MAX_PATH, L"%s.0%s", fileNoExt, ext);
if (!(fFlags & kDontRotateLogs))
{
wchar_t work[MAX_PATH], work2[MAX_PATH];
swprintf(work, MAX_PATH, L"%s.3%s",fileNoExt,ext);
hsSnwprintf(work, MAX_PATH, L"%s.3%s",fileNoExt,ext);
plFileUtils::RemoveFile(work);
swprintf(work2, MAX_PATH, L"%s.2%s",fileNoExt,ext);
hsSnwprintf(work2, MAX_PATH, L"%s.2%s",fileNoExt,ext);
plFileUtils::FileMove(work2, work);
swprintf(work, MAX_PATH, L"%s.1%s",fileNoExt,ext);
hsSnwprintf(work, MAX_PATH, L"%s.1%s",fileNoExt,ext);
plFileUtils::FileMove(work, work2);
plFileUtils::FileMove(fileToOpen, work);
}
@ -541,7 +541,7 @@ void plStatusLog::IParseFileName(wchar_t* file, size_t fnsize, wchar_t* fileNoEx
{
const wchar_t *base = plStatusLogMgr::IGetBasePath();
if( wcslen( base ) != nil )
swprintf( file, fnsize, L"%s%s%s", base, WPATH_SEPARATOR_STR, fFilename.c_str() );
hsSnwprintf( file, fnsize, L"%s%s%s", base, WPATH_SEPARATOR_STR, fFilename.c_str() );
else
wcscpy( file, fFilename.c_str() );

View File

@ -116,7 +116,7 @@ class plResDlgLoader : public plRegistryPageIterator, public plRegistryKeyIterat
{
TVITEM tvi = {0};
tvi.mask = TVIF_TEXT | TVIF_PARAM;
tvi.pszText = text ? (char*)text : "<NULL>";
tvi.pszText = text ? (char*)text : (char*)"<NULL>";
tvi.cchTextMax = text ? strlen(text) : 7;
tvi.lParam = (LPARAM)info;