diff options
Diffstat (limited to 'platform/winrt/os_winrt.cpp')
-rw-r--r-- | platform/winrt/os_winrt.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp index 99c4ad968e..81f3d7adf5 100644 --- a/platform/winrt/os_winrt.cpp +++ b/platform/winrt/os_winrt.cpp @@ -71,7 +71,7 @@ const char * OSWinrt::get_video_driver_name(int p_driver) const { OS::VideoMode OSWinrt::get_default_video_mode() const { - return VideoMode(800,600,false); + return video_mode; } int OSWinrt::get_audio_driver_count() const { @@ -148,6 +148,16 @@ void OSWinrt::initialize(const VideoMode& p_desired,int p_video_driver,int p_aud outside=true; gl_context->initialize(); + VideoMode vm; + vm.width = gl_context->get_window_width(); + vm.height = gl_context->get_window_height(); + vm.fullscreen = true; + vm.resizable = false; + + set_video_mode(vm); + + gl_context->make_current(); + rasterizer = memnew( RasterizerGLES2 ); visual_server = memnew( VisualServerRaster(rasterizer) ); if (get_render_thread_mode()!=RENDER_THREAD_UNSAFE) { @@ -270,6 +280,11 @@ String OSWinrt::get_clipboard() const { }; +void OSWinrt::input_event(InputEvent &p_event) { + p_event.ID = ++last_id; + input->parse_input_event(p_event); +}; + void OSWinrt::delete_main_loop() { if (main_loop) @@ -392,7 +407,7 @@ void OSWinrt::set_window_title(const String& p_title) { void OSWinrt::set_video_mode(const VideoMode& p_video_mode,int p_screen) { - + video_mode = p_video_mode; } OS::VideoMode OSWinrt::get_video_mode(int p_screen) const { @@ -512,7 +527,7 @@ Error OSWinrt::kill(const ProcessID& p_pid) { Error OSWinrt::set_cwd(const String& p_cwd) { - return OK; + return FAILED; } String OSWinrt::get_executable_path() const { @@ -634,6 +649,7 @@ OSWinrt::OSWinrt() { gl_context = NULL; + AudioDriverManagerSW::add_driver(&audio_driver); } |