OSDN Git Service

[VM][General][Win32] Fix byte-order for _RGB888 with little-endian.
authorKyuma Ohta <whatisthis.sowhat@gmail.com>
Sun, 12 Jul 2015 17:42:51 +0000 (02:42 +0900)
committerKyuma Ohta <whatisthis.sowhat@gmail.com>
Sun, 12 Jul 2015 17:42:51 +0000 (02:42 +0900)
source/src/common.h
source/src/config.cpp

index 561c800..32b790f 100644 (file)
@@ -412,7 +412,8 @@ typedef uint16 scrntype;
 #  define RGB_COLOR(r, g, b) ((uint16)(((uint16)(b) & 0xf8) << 8) | (uint16)(((uint16)(g) & 0xfc) << 3) | (uint16)(((uint16)(r) & 0xf8) >> 3))
 typedef uint16 scrntype;
 # elif defined(_RGB888)
-#  define RGB_COLOR(r, g, b) (((uint32)(r) << 0) | ((uint32)(g) << 8) | ((uint32)(b) << 16))
+#  define RGB_COLOR(r, g, b) (((uint32)(r) << 16) | ((uint32)(g) << 8) | ((uint32)(b) << 0))
+typedef uint32 scrntype;
 # elif defined(_RGBA888)
 //#  if defined(USE_BITMAP)
 //#   define RGB_COLOR(r, g, b) (((r | g | b) == 0x00) ? \
index 40055dd..c2c6646 100644 (file)
@@ -168,21 +168,21 @@ bool GetPrivateProfileBool(char *lpAppName, char *lpKeyName, bool bDefault, FILE
    
 #else
 extern _TCHAR* get_parent_dir(_TCHAR* file);
-bool WritePrivateProfileInt(LPCTSTR lpAppName, LPCTSTR lpKeyName, int Value, LPCTSTR lpFileName)
+BOOL WritePrivateProfileInt(LPCTSTR lpAppName, LPCTSTR lpKeyName, int Value, LPCTSTR lpFileName)
 {
        _TCHAR String[32];
        _stprintf_s(String, 32, _T("%d"), Value);
        return WritePrivateProfileString(lpAppName, lpKeyName, String, lpFileName);
 }
 
-bool WritePrivateProfileBool(LPCTSTR lpAppName, LPCTSTR lpKeyName, bool Value, LPCTSTR lpFileName)
+BOOL WritePrivateProfileBool(LPCTSTR lpAppName, LPCTSTR lpKeyName, bool Value, LPCTSTR lpFileName)
 {
        _TCHAR String[32];
        _stprintf_s(String, 32, _T("%d"), Value ? 1 : 0);
        return WritePrivateProfileString(lpAppName, lpKeyName, String, lpFileName);
 }
 
-bool GetPrivateProfileBool(LPCTSTR lpAppName, LPCTSTR lpKeyName, bool bDefault, LPCTSTR lpFileName)
+BOOL GetPrivateProfileBool(LPCTSTR lpAppName, LPCTSTR lpKeyName, bool bDefault, LPCTSTR lpFileName)
 {
        return (GetPrivateProfileInt(lpAppName, lpKeyName, bDefault ? 1 : 0, lpFileName) != 0);
 }