Skip to content

Commit 38a83f3

Browse files
committed
Update Umbra submodule.
This is a regression of the event lag issues until events are switched over to SDL.
1 parent 757c881 commit 38a83f3

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/screen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ bool Screen::update() {
138138
}
139139
if (fadeEnded) fadeLvl=0.0f;
140140
}
141-
return update(elapsed, key, ms);
141+
return update(elapsed, key_, mouse_);
142142
}
143143

144144
void Screen::setFadeIn (int lengthInMilli, TCODColor col) {

src/screen.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ public :
3131
virtual void render() = 0;
3232
virtual bool update(float elapsed, TCOD_key_t &k,TCOD_mouse_t &mouse) = 0;
3333
virtual ~Screen() {}
34-
void keyboard (TCOD_key_t &key) { this->key=key; }
35-
void mouse (TCOD_mouse_t &ms) { this->ms=ms; }
34+
void keyboard (TCOD_key_t &key) { key_ = key; }
35+
void mouse (TCOD_mouse_t &mouse) { mouse_ = mouse; }
3636
bool update (void);
37+
void onEvent (const SDL_Event&) override {}
3738

3839
void setFadeIn (int lengthInMilli, TCODColor col = TCODColor::black); //set fade lengths in milliseconds
3940
void setFadeOut (int lengthInMilli, TCODColor col = TCODColor::black); //set fade lengths in milliseconds
@@ -47,8 +48,8 @@ protected :
4748
TCODColor fadeOutColor;
4849

4950
enum { FADE_UP, FADE_DOWN, FADE_OFF, FADE_NONE } fade;
50-
TCOD_key_t key{};
51-
TCOD_mouse_t ms{};
51+
[[deprecated]] TCOD_key_t key_{};
52+
[[deprecated]] TCOD_mouse_t mouse_{};
5253
void onInitialise();
5354
void prepareImage(TCODImage *img)const;
5455
TCODImage *loadChapterPicture(bool big=false);

0 commit comments

Comments
 (0)