diff Applications/Samples/Sdl/RtViewer/RtViewerSdl.cpp @ 1910:f81cdf283859

display RT-STRUCT before the referenced slices get loaded
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 01 Feb 2022 10:40:35 +0100
parents 184b0aeae1af
children 07964689cb0b
line wrap: on
line diff
--- a/Applications/Samples/Sdl/RtViewer/RtViewerSdl.cpp	Tue Feb 01 08:56:36 2022 +0100
+++ b/Applications/Samples/Sdl/RtViewer/RtViewerSdl.cpp	Tue Feb 01 10:40:35 2022 +0100
@@ -423,6 +423,12 @@
             if (sdlEvent.wheel.y > 0)
               delta = 1;
 
+            if (SDL_SCANCODE_LCTRL < scancodeCount &&
+                keyboardState[SDL_SCANCODE_LCTRL])  // Speed up scrolling if CTRL is down
+            {
+              delta *= 10;
+            }
+
             view->Scroll(delta);
           }
           else