finished building 4coder with MSVC 2017

master
Allen Webster 2017-03-17 14:38:09 -04:00
parent a6d0156e0c
commit 7fd55df13f
3 changed files with 20 additions and 18 deletions

View File

@ -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;
}
}

View File

@ -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)

View File

@ -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);