ソースを参照

made a workaround to ensure that translations can be done through our custom system rather than using wx's internal system

jp9000 12 年 前
コミット
56034fd9ac
3 ファイル変更14 行追加8 行削除
  1. 9 7
      obs/obs-app.cpp
  2. 0 1
      obs/window-obs-basic.cpp
  3. 5 0
      obs/window-subclass.hpp

+ 9 - 7
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();
 }

+ 0 - 1
obs/window-obs-basic.cpp

@@ -15,7 +15,6 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 
-#include <wx/app.h>
 #include "obs-app.hpp"
 #include "window-obs-basic.hpp"
 

+ 5 - 0
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,