mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-29 00:12:52 +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;
|
timetowait = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(timetowait > 0)
|
if(timetowait > 0) {
|
||||||
|
#if !CAP_SDL2
|
||||||
SDL_Delay(timetowait);
|
SDL_Delay(timetowait);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
ors::check_orientation();
|
ors::check_orientation();
|
||||||
if(cmode & sm::CENTER) {
|
if(cmode & sm::CENTER) {
|
||||||
@ -931,6 +934,7 @@ EX void mainloopiter() {
|
|||||||
forcetarget = anyshiftclick;
|
forcetarget = anyshiftclick;
|
||||||
|
|
||||||
didsomething = false;
|
didsomething = false;
|
||||||
|
currently_scrolling = false;
|
||||||
|
|
||||||
if(vid.shifttarget&1) {
|
if(vid.shifttarget&1) {
|
||||||
#if ISPANDORA
|
#if ISPANDORA
|
||||||
@ -1067,6 +1071,14 @@ EX void mainloopiter() {
|
|||||||
if((cmode & (sm::DRAW | sm::MAP)) && holdmouse && anims::ma && mouseover)
|
if((cmode & (sm::DRAW | sm::MAP)) && holdmouse && anims::ma && mouseover)
|
||||||
handlekey(getcstat, getcstat);
|
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);
|
while(SDL_PollEvent(&ev)) handle_event(ev);
|
||||||
fix_mouseh();
|
fix_mouseh();
|
||||||
|
|
||||||
|
@ -2483,7 +2483,7 @@ EX void panning(shiftpoint hf0, shiftpoint ht0) {
|
|||||||
hyperpoint ht = unshift(ht0, hf0.shift);
|
hyperpoint ht = unshift(ht0, hf0.shift);
|
||||||
View =
|
View =
|
||||||
rgpushxto0(hf) * rgpushxto0(gpushxto0(hf) * ht) * gpushxto0(hf) * View;
|
rgpushxto0(hf) * rgpushxto0(gpushxto0(hf) * ht) * gpushxto0(hf) * View;
|
||||||
playermoved = false;
|
playermoved = false; currently_scrolling = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
EX int cells_drawn, cells_generated;
|
EX int cells_drawn, cells_generated;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user