MSVC buildfixes

This commit is contained in:
twinaphex 2021-05-21 17:09:55 +02:00
parent 30143f15f2
commit b45acf2223
5 changed files with 7 additions and 5 deletions

2
deps/7zip/Bcj2.c vendored
View File

@ -8,8 +8,10 @@
#define CProb UInt16
#undef kTopValue
#define kTopValue ((UInt32)1 << 24)
#define kNumModelBits 11
#undef kBitModelTotal
#define kBitModelTotal (1 << kNumModelBits)
#define kNumMoveBits 5

3
deps/7zip/LzmaEnc.c vendored
View File

@ -973,7 +973,8 @@ MY_NO_INLINE static void MY_FAST_CALL LenPriceEnc_UpdateTables(
printf("\n MovePos %u", num);
#endif
*/
#undef MOVE_POS
#define MOVE_POS(p, num) { \
p->additionalOffset += (num); \
p->matchFinder.Skip(p->matchFinderObj, (UInt32)(num)); }

View File

@ -89,6 +89,7 @@ static void gdi_render_msg(
const char *msg,
const struct font_params *params)
{
char* msg_local;
float x, y, scale, drop_mod, drop_alpha;
int drop_x, drop_y, msg_strlen;
unsigned i;
@ -142,8 +143,7 @@ static void gdi_render_msg(
blue = video_msg_color_b * 255.0f;
}
char* msg_local = utf8_to_local_string_alloc(msg);
msg_local = utf8_to_local_string_alloc(msg);
msg_strlen = strlen(msg_local);
GetTextExtentPoint32(font->gdi->memDC, msg_local, msg_strlen, &textSize);

View File

@ -108,7 +108,7 @@ static void gfx_widget_leaderboard_display_frame(void* data, void* userdata)
gfx_display_set_alpha(p_dispwidget->backdrop_orig, DEFAULT_BACKDROP);
gfx_display_set_alpha(pure_white, 1.0f);
for (i = 0; i < state->count; ++i)
for (i = 0; i < (unsigned)state->count; ++i)
{
const unsigned widget_width = state->info[i].width;
x = video_width - widget_width - spacing;

View File

@ -1138,7 +1138,6 @@ bool runtime_log_has_last_played(runtime_log_t *runtime_log)
/* Saves specified runtime log to disk */
void runtime_log_save(runtime_log_t *runtime_log)
{
int n;
char value_string[64]; /* 64 characters should be
enough for a very long runtime... :) */
RFILE *file = NULL;