diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-12-16 22:33:35 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-12-16 22:33:35 -0300 |
commit | d55f95e0d2a2f99a4130a33ad542c3682d0b92db (patch) | |
tree | 5e413e2e81398254ac2e5d7421c5fd893ef537a7 /platform/winrt/os_winrt.cpp | |
parent | bcf27feb980aec593c7cb771984e46113cfad757 (diff) | |
parent | 1664cd67101722f0955385ed6b463f534830aeed (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
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); } |