mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-07 19:26:45 +00:00
more fixes to currently_scrolling; also use SDL_WaitEventTimeout in SDL2
This commit is contained in:
parent
b7d50896ec
commit
7830e45109
14
control.cpp
14
control.cpp
@ -859,8 +859,11 @@ EX void mainloopiter() {
|
||||
timetowait = 0;
|
||||
#endif
|
||||
|
||||
if(timetowait > 0)
|
||||
if(timetowait > 0) {
|
||||
#if !CAP_SDL2
|
||||
SDL_Delay(timetowait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
ors::check_orientation();
|
||||
if(cmode & sm::CENTER) {
|
||||
@ -931,6 +934,7 @@ EX void mainloopiter() {
|
||||
forcetarget = anyshiftclick;
|
||||
|
||||
didsomething = false;
|
||||
currently_scrolling = false;
|
||||
|
||||
if(vid.shifttarget&1) {
|
||||
#if ISPANDORA
|
||||
@ -1067,6 +1071,14 @@ EX void mainloopiter() {
|
||||
if((cmode & (sm::DRAW | sm::MAP)) && holdmouse && anims::ma && mouseover)
|
||||
handlekey(getcstat, getcstat);
|
||||
|
||||
if(((SDL_GetMouseState(NULL, NULL) & SDL_BUTTON_MMASK)) && !mouseout2())
|
||||
currently_scrolling = true;
|
||||
|
||||
#if CAP_SDL2
|
||||
if(timetowait > 0) {
|
||||
if(SDL_WaitEventTimeout(&ev, timetowait)) handle_event(ev);
|
||||
}
|
||||
#endif
|
||||
while(SDL_PollEvent(&ev)) handle_event(ev);
|
||||
fix_mouseh();
|
||||
|
||||
|
@ -2483,7 +2483,7 @@ EX void panning(shiftpoint hf0, shiftpoint ht0) {
|
||||
hyperpoint ht = unshift(ht0, hf0.shift);
|
||||
View =
|
||||
rgpushxto0(hf) * rgpushxto0(gpushxto0(hf) * ht) * gpushxto0(hf) * View;
|
||||
playermoved = false;
|
||||
playermoved = false; currently_scrolling = true;
|
||||
}
|
||||
|
||||
EX int cells_drawn, cells_generated;
|
||||
|
Loading…
x
Reference in New Issue
Block a user