Buildfixes

This commit is contained in:
Henrik Rydgård 2017-08-07 17:09:16 +02:00
parent b87ae5d7db
commit e6bf7b5fe0
2 changed files with 10 additions and 7 deletions

View file

@ -689,8 +689,8 @@ int main(int argc, char *argv[]) {
while (true) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
float mx = event.motion.x * g_dpi_scale;
float my = event.motion.y * g_dpi_scale;
float mx = event.motion.x * g_dpi_scale_x;
float my = event.motion.y * g_dpi_scale_y;
switch (event.type) {
case SDL_QUIT:

View file

@ -175,15 +175,18 @@ static GraphicsContext *graphicsContext;
}
g_dpi = (IS_IPAD() ? 200.0f : 150.0f) * scale;
g_dpi_scale = 240.0f / g_dpi;
g_dpi_scale_real = g_dpi_scale;
g_dpi_scale_x = 240.0f / g_dpi;
g_dpi_scale_y = 240.0f / g_dpi;
g_dpi_scale_real_x = g_dpi_scale_x;
g_dpi_scale_real_y = g_dpi_scale_y;
pixel_xres = size.width * scale;
pixel_yres = size.height * scale;
dp_xres = pixel_xres * g_dpi_scale;
dp_yres = pixel_yres * g_dpi_scale;
dp_xres = pixel_xres * g_dpi_scale_x;
dp_yres = pixel_yres * g_dpi_scale_y;
pixel_in_dps = (float)pixel_xres / (float)dp_xres;
pixel_in_dps_x = (float)pixel_xres / (float)dp_xres;
pixel_in_dps_y = (float)pixel_yres / (float)dp_yres;
graphicsContext = new IOSDummyGraphicsContext();