ded

Dramatic EDitor
Index Commits Files Refs README LICENSE
commit 4c8caef792a3dbd3802affe8f6f4c565dc5ecb75
parent fa287f71f8144a1e0c48ffdcd328bbde81d4704d
Author: Danil Kolumbet <kolumbetko@gmail.com>
Date:   Fri,  2 Jul 2021 00:10:14 +0300

Try to fix MSVC

Diffstat:
Mmain.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/main.c b/main.c
@@ -86,8 +86,8 @@ Font font_load_from_file(SDL_Renderer *renderer, const char *file_path)
         const size_t col = index % FONT_COLS;
         const size_t row = index / FONT_COLS;
         font.glyph_table[index] = (SDL_Rect) {
-            .x = col * FONT_CHAR_WIDTH,
-            .y = row * FONT_CHAR_HEIGHT,
+            .x = (int) col * FONT_CHAR_WIDTH,
+            .y = (int) row * FONT_CHAR_HEIGHT,
             .w = FONT_CHAR_WIDTH,
             .h = FONT_CHAR_HEIGHT,
         };
@@ -148,7 +148,7 @@ size_t buffer_size = 0;
 void render_cursor(SDL_Renderer *renderer, Uint32 color)
 {
     const SDL_Rect rect = {
-        .x = (int) floorf(buffer_cursor * FONT_CHAR_WIDTH * FONT_SCALE),
+        .x = (int) floorf((float) buffer_cursor * FONT_CHAR_WIDTH * FONT_SCALE),
         .y = 0,
         .w = FONT_CHAR_WIDTH * FONT_SCALE,
         .h = FONT_CHAR_HEIGHT * FONT_SCALE,