- [FIX] Ara les coordinades del ratolí son lo que toca respecte al joc, no al tamany real de la finestra
This commit is contained in:
9
mini.cpp
9
mini.cpp
@@ -391,8 +391,13 @@ int main(int argc,char*argv[]){
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
keys = SDL_GetKeyboardState(NULL);
|
keys = SDL_GetKeyboardState(NULL);
|
||||||
mouse_buttons = SDL_GetMouseState(&mouse_x, &mouse_y);
|
int real_mouse_x, real_mouse_y;
|
||||||
mouse_x /= screen_zoom; mouse_y /= screen_zoom;
|
mouse_buttons = SDL_GetMouseState(&real_mouse_x, &real_mouse_y);
|
||||||
|
float mx, my;
|
||||||
|
SDL_RenderWindowToLogical(mini_ren, real_mouse_x, real_mouse_y, &mx, &my);
|
||||||
|
mouse_x = int(mx);
|
||||||
|
mouse_y = int(my);
|
||||||
|
//mouse_x /= screen_zoom; mouse_y /= screen_zoom;
|
||||||
|
|
||||||
if (SDL_GetTicks()-dt>13) {
|
if (SDL_GetTicks()-dt>13) {
|
||||||
dt = SDL_GetTicks();
|
dt = SDL_GetTicks();
|
||||||
|
|||||||
Reference in New Issue
Block a user