mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 14:39:18 +02:00
Merge remote-tracking branch 'Milek7/lua' into mover_in_c++
This commit is contained in:
9
EU07.cpp
9
EU07.cpp
@@ -33,6 +33,7 @@ Stele, firleju, szociu, hunter, ZiomalCl, OLI_EU and others
|
||||
#include "Timer.h"
|
||||
#include "resource.h"
|
||||
#include "uilayer.h"
|
||||
#include "uart.h"
|
||||
|
||||
#pragma comment (lib, "glu32.lib")
|
||||
#pragma comment (lib, "dsound.lib")
|
||||
@@ -54,7 +55,7 @@ keyboard_input Keyboard;
|
||||
mouse_input Mouse;
|
||||
gamepad_input Gamepad;
|
||||
glm::dvec2 mouse_pickmodepos; // stores last mouse position in control picking mode
|
||||
|
||||
std::unique_ptr<uart_input> uart;
|
||||
}
|
||||
|
||||
void screenshot_save_thread( char *img )
|
||||
@@ -354,9 +355,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
sound_man = std::make_unique<sound_manager>();
|
||||
|
||||
Global::pWorld = &World;
|
||||
|
||||
input::Keyboard.init();
|
||||
input::Mouse.init();
|
||||
input::Gamepad.init();
|
||||
if (Global::uart_conf.enable)
|
||||
input::uart = std::make_unique<uart_input>();
|
||||
|
||||
Global::pWorld = &World;
|
||||
if( false == World.Init( window ) ) {
|
||||
@@ -398,6 +403,8 @@ int main(int argc, char *argv[])
|
||||
&& ( true == GfxRenderer.Render() ) ) {
|
||||
glfwPollEvents();
|
||||
input::Keyboard.poll();
|
||||
if (input::uart)
|
||||
input::uart->poll();
|
||||
if( true == Global::InputMouse ) { input::Mouse.poll(); }
|
||||
if( true == Global::InputGamepad ) { input::Gamepad.poll(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user