Pārlūkot izejas kodu

Merge pull request #24 from ypujante/fix-23

Fix for #23 (shift and super not set properly)
Jeffery Myers 2 gadi atpakaļ
vecāks
revīzija
ce2df596a2
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      rlImGui.cpp

+ 2 - 2
rlImGui.cpp

@@ -162,7 +162,7 @@ static void rlImGuiEvents()
 
 
 	bool shiftDown = rlImGuiIsShiftDown();
 	bool shiftDown = rlImGuiIsShiftDown();
 	if (shiftDown != LastShiftPressed)
 	if (shiftDown != LastShiftPressed)
-		io.AddKeyEvent(ImGuiMod_Shift, ctrlDown);
+		io.AddKeyEvent(ImGuiMod_Shift, shiftDown);
 	LastShiftPressed = shiftDown;
 	LastShiftPressed = shiftDown;
 
 
 	bool altDown = rlImGuiIsAltDown();
 	bool altDown = rlImGuiIsAltDown();
@@ -172,7 +172,7 @@ static void rlImGuiEvents()
 
 
 	bool superDown = rlImGuiIsSuperDown();
 	bool superDown = rlImGuiIsSuperDown();
 	if (superDown != LastSuperPressed)
 	if (superDown != LastSuperPressed)
-		io.AddKeyEvent(ImGuiMod_Super, ctrlDown);
+		io.AddKeyEvent(ImGuiMod_Super, superDown);
 	LastSuperPressed = superDown;
 	LastSuperPressed = superDown;
 
 
 	// get the pressed keys, they are in event order
 	// get the pressed keys, they are in event order