From 818ebcdb437ee460d3f6ea33c2a29e57bed1ca20 Mon Sep 17 00:00:00 2001 From: Julian Hinxlage Date: Tue, 26 Nov 2019 15:57:54 +0100 Subject: [PATCH] ~ fixed compiler errors (KeyCode) --- src/GUI.hpp | 2 +- src/GUI_Window.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GUI.hpp b/src/GUI.hpp index 010b0dd..50f8706 100644 --- a/src/GUI.hpp +++ b/src/GUI.hpp @@ -20,7 +20,7 @@ */ class GUI_Window : public Fl_Window { int x, y, button; - vkvm::KeyCode* keyCode; + vkvm::KeyCode keyCode; int handle(int e); char* position_to_string(int x,int y); public: diff --git a/src/GUI_Window.cpp b/src/GUI_Window.cpp index dca0eb7..fa4b65d 100644 --- a/src/GUI_Window.cpp +++ b/src/GUI_Window.cpp @@ -45,16 +45,16 @@ auto GUI_Window::handle(int e) -> int { /*keyboardbutton*/ case FL_KEYBOARD: button = Fl::event_button(); - keyCode = new vkvm::KeyCode(button); - vkvm::buttonPressed(*keyCode); + keyCode = vkvm::KeyCode(button); + vkvm::buttonPressed(keyCode); vkvm::callEvent(vkvm::EventType::KeyDown); this->child(2)->label("Event:Key Down"); return 1; case FL_KEYUP: button = Fl::event_button(); std::cout<child(2)->label("Event:Key Up"); return 1;