diff --git a/4ed_system_shared.cpp b/4ed_system_shared.cpp index 0aa088e8..3d35642b 100644 --- a/4ed_system_shared.cpp +++ b/4ed_system_shared.cpp @@ -622,12 +622,12 @@ font_load_page_inner(Partition *part, Render_Font *font, FT_Library ft, FT_Face // write to texture atlas i32 pitch = face->glyph->bitmap.pitch; - for(i32 j = 0; j < h; ++j){ - for(i32 i = 0; i < w; ++i){ - i32 x = pen_x + i; - i32 y = pen_y + j; + for(i32 Y = 0; Y < h; ++Y){ + for(i32 X = 0; X < w; ++X){ + i32 x = pen_x + X; + i32 y = pen_y + Y; - pixels[y * tex_width + x] = face->glyph->bitmap.buffer[j * pitch + i] * 0x01010101; + pixels[y * tex_width + x] = face->glyph->bitmap.buffer[Y * pitch + X] * 0x01010101; } } diff --git a/meta/4tech_file_moving.h b/meta/4tech_file_moving.h index 83823165..e1289c0c 100644 --- a/meta/4tech_file_moving.h +++ b/meta/4tech_file_moving.h @@ -72,7 +72,7 @@ static i32 prev_error = 0; int32_t n = snprintf(SF_CMD, sizeof(SF_CMD), __VA_ARGS__); \ AllowLocal(n); \ Assert(n < sizeof(SF_CMD)); \ - /**/ printf("%s\n", SF_CMD); /**/ \ + /** printf("%s\n", SF_CMD); /**/ \ prev_error = system(SF_CMD); \ if (prev_error != 0) error_state = 1; \ }while(0) diff --git a/win32_4ed.cpp b/win32_4ed.cpp index c56a7373..7e7f0fc7 100644 --- a/win32_4ed.cpp +++ b/win32_4ed.cpp @@ -2155,21 +2155,23 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS exit(1); } - HDC hdc = GetDC(win32vars.window_handle); - + { + HDC hdc = GetDC(win32vars.window_handle); + #if SUPPORT_DPI - // TODO(allen): not Windows XP compatible, how do I handle that? - SetProcessDPIAware(); - - win32vars.dpi_x = GetDeviceCaps(hdc, LOGPIXELSX); - win32vars.dpi_y = GetDeviceCaps(hdc, LOGPIXELSY); + // TODO(allen): not Windows XP compatible, how do I handle that? + SetProcessDPIAware(); + + win32vars.dpi_x = GetDeviceCaps(hdc, LOGPIXELSX); + win32vars.dpi_y = GetDeviceCaps(hdc, LOGPIXELSY); #else - win32vars.dpi_x = 1; - win32vars.dpi_y = 1; + win32vars.dpi_x = 1; + win32vars.dpi_y = 1; #endif - - GetClientRect(win32vars.window_handle, &window_rect); - ReleaseDC(win32vars.window_handle, hdc); + + GetClientRect(win32vars.window_handle, &window_rect); + ReleaseDC(win32vars.window_handle, hdc); + } Win32InitGL(); Win32Resize(window_rect.right - window_rect.left, window_rect.bottom - window_rect.top);