Try to fix blackberry build

This commit is contained in:
Henrik Rydgard 2016-01-01 15:17:55 +01:00
parent 95822a165d
commit 5ff8224075

View File

@ -13,12 +13,22 @@
#include <bps/navigator_invoke.h> // Receive invocation messages
#include "BlackberryMain.h"
#include "base/NKCodeFromBlackberry.h"
#include "thin3d/thin3d.h"
// Bad: PPSSPP includes from native
#include "Core/System.h"
#include "Core/Config.h"
#include "Core/Core.h"
#include "UI/MiscScreens.h"
#include "Common/GraphicsContext.h"
static GraphicsContext *graphicsContext;
class GLDummyGraphicsContext : public DummyGraphicsContext {
public:
Thin3DContext *CreateThin3DContext() override {
return T3DCreateGLContext();
}
};
static bool g_quitRequested = false;
@ -255,7 +265,8 @@ void BlackberryMain::startMain(int argc, char *argv[]) {
dialog_request_events(0);
vibration_request_events(0);
NativeInit(argc, (const char **)argv, "/accounts/1000/shared/misc/", "app/native/assets/", "BADCOFFEE");
NativeInitGraphics();
graphicsContext = new GLDummyGraphicsContext();
NativeInitGraphics(graphicsContext);
audio = new BlackberryAudio();
runMain();
}
@ -349,6 +360,8 @@ void BlackberryMain::endMain() {
bps_shutdown();
NativeShutdownGraphics();
delete audio;
graphicsContext->Shutdown();
delete graphicsContext;
NativeShutdown();
killDisplays();
net::Shutdown();