[education/rkward] rkward/rbackend: Fix compilation with R 4.2 on Windows

Thomas Friedrichsmeier null at kde.org
Fri Apr 22 23:25:57 BST 2022


Git commit c67da5ecc7fb2ad07e5e0895ef6c75aeca0c2a62 by Thomas Friedrichsmeier.
Committed on 22/04/2022 at 22:23.
Pushed by tfry into branch 'master'.

Fix compilation with R 4.2 on Windows

M  +4    -0    rkward/rbackend/rkrbackend.cpp

https://invent.kde.org/education/rkward/commit/c67da5ecc7fb2ad07e5e0895ef6c75aeca0c2a62

diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 2f28b7d6..f4f1aa71 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -819,7 +819,11 @@ void RKRBackend::setupCallbacks () {
 	RK_R_Params.home = getRUser ();
 	RK_R_Params.CharacterMode = RGui;
 	RK_R_Params.ShowMessage = RShowMessage;
+#if R_VERSION < R_Version(4, 2, 0)
 	RK_R_Params.ReadConsole = RReadConsoleWin;
+#else
+	RK_R_Params.ReadConsole = RReadConsole;
+#endif
 	RK_R_Params.WriteConsoleEx = RWriteConsoleEx;
 	RK_R_Params.WriteConsole = 0;
 	RK_R_Params.CallBack = RKREventLoop::winRKEventHandlerWrapper;



More information about the rkward-tracker mailing list