diff --git a/desmume/src/cheatSystem.cpp b/desmume/src/cheatSystem.cpp index acd6992a6..228be8765 100644 --- a/desmume/src/cheatSystem.cpp +++ b/desmume/src/cheatSystem.cpp @@ -159,7 +159,7 @@ BOOL cheatsSave() { for (int t = 0; t < cheats[i].num; t++) { - fprintf(fcheat, "Data=%08lX%08lX", cheats[i].hi[t], cheats[i].lo[t]); + fprintf(fcheat, "Data=%08X%08X", cheats[i].hi[t], cheats[i].lo[t]); if (t < (cheats[i].num - 1)) fputs(",", fcheat); } fputs("\n", fcheat); @@ -226,10 +226,10 @@ BOOL cheatsLoad() for (int j=0; jsize) { case BITS_8: - regInfosBuffer = g_strdup_printf("0x%02lX", current_reg[c]->value(c)); + regInfosBuffer = g_strdup_printf("0x%02X", current_reg[c]->value(c)); break; case BITS_16: - regInfosBuffer = g_strdup_printf("0x%04lX", current_reg[c]->value(c)); + regInfosBuffer = g_strdup_printf("0x%04X", current_reg[c]->value(c)); break; default: - regInfosBuffer = g_strdup_printf("0x%08lX", current_reg[c]->value(c)); + regInfosBuffer = g_strdup_printf("0x%08X", current_reg[c]->value(c)); } // gtk_box_pack_start(GTK_BOX(mVbox0[c]), mRegInfos[c], FALSE, FALSE, 0); gtk_label_set_label(GTK_LABEL(mRegInfos[c]), regInfosBuffer); @@ -450,7 +450,7 @@ static void open(int ID) for(i = 0; i < GET_REG_LIST_SIZE(c); i++) { gchar *reg_name_buffer; - reg_name_buffer = g_strdup_printf("0x%08lX : %s (%s)", GET_REG_LIST(c)[i].adress, GET_REG_LIST(c)[i].name, bits_strings[GET_REG_LIST(c)[i].size]); + reg_name_buffer = g_strdup_printf("0x%08X : %s (%s)", GET_REG_LIST(c)[i].adress, GET_REG_LIST(c)[i].name, bits_strings[GET_REG_LIST(c)[i].size]); gtk_combo_box_append_text(GTK_COMBO_BOX(mIoRegCombo[c]), reg_name_buffer); g_free(reg_name_buffer); } diff --git a/desmume/src/types.h b/desmume/src/types.h index 7d8c9233c..ea9c82eeb 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -133,26 +133,24 @@ typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; typedef unsigned long u64; -typedef unsigned long pointer; typedef signed char s8; typedef signed short s16; typedef signed int s32; -typedef signed long s64; +typedef signed long long s64; #else typedef unsigned char u8; typedef unsigned short u16; -typedef unsigned long u32; +typedef unsigned int u32; #if defined(_MSC_VER) || defined(__INTEL_COMPILER) typedef unsigned __int64 u64; #else typedef unsigned long long u64; #endif -typedef unsigned long pointer; typedef signed char s8; typedef signed short s16; -typedef signed long s32; +typedef signed int s32; #if defined(_MSC_VER) || defined(__INTEL_COMPILER) typedef __int64 s64; #else diff --git a/desmume/src/utils/guid.cpp b/desmume/src/utils/guid.cpp index fbff7c80f..900519643 100644 --- a/desmume/src/utils/guid.cpp +++ b/desmume/src/utils/guid.cpp @@ -32,7 +32,7 @@ void Desmume_Guid::newGuid() std::string Desmume_Guid::toString() { char buf[37]; - sprintf(buf,"%08lX-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X", + sprintf(buf,"%08X-%04X-%04X-%04X-%02X%02X%02X%02X%02X%02X", de32lsb(data),de16lsb(data+4),de16lsb(data+6),de16lsb(data+8),data[10],data[11],data[12],data[13],data[14],data[15]); return std::string(buf); }