Skip to content

Commit

Permalink
If this works... I don't even.
Browse files Browse the repository at this point in the history
  • Loading branch information
computerquip committed Jan 8, 2014
1 parent 80834f8 commit b5c4275
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
18 changes: 10 additions & 8 deletions obs/obs-app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ using namespace std;

IMPLEMENT_APP(OBSApp);

#ifdef __linux__
#include <X11/Xlib.h>
OBSAppBase::OBSAppBase()
{
XInitThreads();
}
#endif

OBSAppBase::~OBSAppBase()
{
blog(LOG_INFO, "Number of memory leaks: %llu", bnum_allocs());
Expand Down Expand Up @@ -193,16 +201,10 @@ bool OBSApp::OnInit()
return false;
if (!InitLocale())
return false;

return true;
}

int OBSApp::OnRun()
{
if (!InitOBSBasic())
return -1;
return false;

return wxApp::OnRun();
return true;
}

int OBSApp::OnExit()
Expand Down
2 changes: 1 addition & 1 deletion obs/obs-app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

class OBSAppBase : public wxApp {
public:
OBSAppBase();
virtual ~OBSAppBase();
};

Expand All @@ -48,7 +49,6 @@ class OBSApp : public OBSAppBase {

public:
virtual bool OnInit();
virtual int OnRun();
virtual int OnExit();

inline wxWindow *GetMainWindow() const {return mainWindow;}
Expand Down
3 changes: 1 addition & 2 deletions obs/wx-wrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <wx/msgdlg.h>
#include <obs.h>
#include "wx-wrappers.hpp"
#include <wx/utils.h>

#ifdef __linux__
#include <gdk/gdkx.h>
Expand All @@ -32,8 +33,6 @@ gs_window WxToGSWindow(wxWindow *wxwin)
{
gs_window window;

/* TODO: OMG PLEASE REMOVE THIS IS STUPID */
wxwin->Show(true);
#ifdef __APPLE__
window.view = (id)wxwin->GetHandle();
#elif _WIN32
Expand Down

0 comments on commit b5c4275

Please sign in to comment.