diff --git a/liberty/Makefile b/liberty/Makefile index 3be60a74..f8039e37 100644 --- a/liberty/Makefile +++ b/liberty/Makefile @@ -310,7 +310,7 @@ texconv: $(OBJS_TEXCONV) | pvrtex # You'll have to rebuild pvrtex manually if yo $(CXX) -o $@ $(OBJS_TEXCONV) %.texconv.o: %.cpp - $(CXX) -std=c++2a -c -O3 -g -MMD -MP -o $@ -I../vendor/koshle -I../vendor/librw/src $(INCLUDE) -I../vendor/emu -I../vendor/crypto -I../vendor/TriStripper/include $(DEFINES) -DDC_TEXCONV -DDC_SIM -D_INC_WINDOWS $(TEXCONV_FLAGS) $< + $(CXX) -std=c++2a -c -O3 -g -MMD -MP -o $@ -I../vendor/koshle -I../vendor/librw/src $(INCLUDE) -I../vendor/emu -I../vendor/crypto -I../vendor/TriStripper/include $(DEFINES) -DDC_TEXCONV -DDC_SIM $(TEXCONV_FLAGS) $< animtool: ../src/tools/animtool.cpp $(CXX) -std=c++17 -o $@ -g -O0 $< diff --git a/vendor/koshle/dc_hle_types.h b/vendor/koshle/dc_hle_types.h index a5c2f114..8b6c58ef 100644 --- a/vendor/koshle/dc_hle_types.h +++ b/vendor/koshle/dc_hle_types.h @@ -19,7 +19,6 @@ typedef volatile int vint32; /**< \brief 32-bit signed integer * typedef volatile short vint16; /**< \brief 16-bit signed integer */ typedef volatile char vint8; /**< \brief 8-bit signed integer */ -typedef uint64 ptr_t; #define INT32_IS_INT #elif ((__LONG_LONG_MAX__*2ULL+1ULL) == 18446744073709551615ULL) && ((__LONG_MAX__ *2UL+1UL) == 4294967295ULL) // These are -m32 specific and try to follow KOS rules @@ -41,11 +40,16 @@ typedef volatile long vint32; /**< \brief 32-bit signed integer typedef volatile short vint16; /**< \brief 16-bit signed integer */ typedef volatile char vint8; /**< \brief 8-bit signed integer */ -typedef uint32 ptr_t; #else #error "Unable to detect basic types" #endif +#if __SIZEOF_POINTER__ == 4 +typedef uint32 ptr_t; +#else +typedef uint64 ptr_t; +#endif + static_assert(sizeof(uint64) == 8, "uint64 size is not 8 bytes"); static_assert(sizeof(uint32) == 4, "uint32 size is not 4 bytes"); static_assert(sizeof(uint16) == 2, "uint16 size is not 2 bytes");