Browse Source

Fix some minGW bugs.

Darryl Pogue 13 years ago
parent
commit
d39a8ab298
  1. 2
      Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp
  2. 1
      Sources/Plasma/NucleusLib/pnSceneObject/CMakeLists.txt
  3. 2
      Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Misc.cpp
  4. 2
      Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt
  5. 10
      Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp
  6. 2
      Sources/Tools/plResBrowser/plResTreeView.cpp

2
Sources/Plasma/NucleusLib/pnProduct/Private/pnPrProductId.cpp

@ -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",

1
Sources/Plasma/NucleusLib/pnSceneObject/CMakeLists.txt

@ -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})

2
Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Misc.cpp

@ -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 {

2
Sources/Plasma/PubUtilLib/plStatusLog/CMakeLists.txt

@ -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})

10
Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp

@ -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() );

2
Sources/Tools/plResBrowser/plResTreeView.cpp

@ -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;

Loading…
Cancel
Save