Micro optimization
This commit is contained in:
parent
e47e2b2560
commit
43a25c49c4
@ -569,9 +569,6 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) {
|
||||
}
|
||||
if (!w) return;
|
||||
|
||||
int s;
|
||||
bool is_high_resolution = flags & 1;
|
||||
Screen *screen = w->render_data.screen;
|
||||
enum MomentumData { NoMomentumData, MomentumPhaseBegan, MomentumPhaseStationary, MomentumPhaseActive, MomentumPhaseEnded, MomentumPhaseCancelled, MomentumPhaseMayBegin };
|
||||
enum MomentumData momentum_data = (flags >> 1) & 7;
|
||||
|
||||
@ -587,6 +584,11 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) {
|
||||
break;
|
||||
}
|
||||
if (yoffset == 0.0) return;
|
||||
|
||||
int s;
|
||||
bool is_high_resolution = flags & 1;
|
||||
Screen *screen = w->render_data.screen;
|
||||
|
||||
if (is_high_resolution) {
|
||||
yoffset *= OPT(touch_scroll_multiplier);
|
||||
if (yoffset * global_state.callback_os_window->pending_scroll_pixels < 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user