From 56034fd9ac2a13b78ed2feef2f0c3b78aa378923 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 26 Nov 2013 22:22:41 -0700 Subject: [PATCH] made a workaround to ensure that translations can be done through our custom system rather than using wx's internal system --- obs/obs-app.cpp | 16 +++++++++------- obs/window-obs-basic.cpp | 1 - obs/window-subclass.hpp | 5 +++++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/obs/obs-app.cpp b/obs/obs-app.cpp index 4c991ab44..1455f1982 100644 --- a/obs/obs-app.cpp +++ b/obs/obs-app.cpp @@ -118,15 +118,17 @@ bool OBSApp::OnInit() OBSBasic *mainWindow = new OBSBasic(); struct obs_video_info ovi; - ovi.adapter = 0; - ovi.base_width = 2; - ovi.base_height = 2; + ovi.graphics_module = "libobs-opengl"; ovi.fps_num = 30000; ovi.fps_den = 1001; - ovi.graphics_module = "libobs-opengl"; + ovi.window_width = 2; + ovi.window_height = 2; + ovi.base_width = 1920; + ovi.base_height = 1080; + ovi.output_width = 1280; + ovi.output_height = 720; ovi.output_format = VIDEO_FORMAT_RGBA; - ovi.output_width = 2; - ovi.output_height = 2; + ovi.adapter = 0; ovi.window = WxToGSWindow(dummyWindow); if (!obs_reset_video(&ovi)) @@ -148,5 +150,5 @@ int OBSApp::OnExit() void OBSApp::CleanUp() { - OBSAppBase::CleanUp(); + wxApp::CleanUp(); } diff --git a/obs/window-obs-basic.cpp b/obs/window-obs-basic.cpp index b3b4d0496..1f4d2bb77 100644 --- a/obs/window-obs-basic.cpp +++ b/obs/window-obs-basic.cpp @@ -15,7 +15,6 @@ along with this program. If not, see . ******************************************************************************/ -#include #include "obs-app.hpp" #include "window-obs-basic.hpp" diff --git a/obs/window-subclass.hpp b/obs/window-subclass.hpp index ddee303c6..ee891d609 100644 --- a/obs/window-subclass.hpp +++ b/obs/window-subclass.hpp @@ -24,6 +24,11 @@ * microsoft "recommends", the fonts they recommend look like utter garbage) */ +#ifdef _ +#undef _ +#define _(str) str +#endif + class WindowSubclass : public wxFrame { public: WindowSubclass(wxWindow* parent, wxWindowID id, const wxString& title,