mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-16 03:39:56 -05:00
Fixed iOS and OSX builds.
This commit is contained in:
parent
7068c17b01
commit
2f72afca65
4 changed files with 9 additions and 20 deletions
|
@ -3,7 +3,7 @@
|
|||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <bx/bx.h>
|
||||
#include "entry.h"
|
||||
|
||||
#if BX_PLATFORM_IOS
|
||||
|
||||
|
@ -11,15 +11,10 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import <QuartzCore/CAEAGLLayer.h>
|
||||
|
||||
#include <bgfxplatform.h>
|
||||
#include "entry_p.h"
|
||||
#include <bx/uint32_t.h>
|
||||
#include <bx/thread.h>
|
||||
|
||||
#include "entry_p.h"
|
||||
#include "dbg.h"
|
||||
|
||||
extern int _main_(int _argc, char** _argv);
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
void renderFrame();
|
||||
|
@ -64,7 +59,7 @@ namespace entry
|
|||
int32_t MainThreadEntry::threadFunc(void* _userData)
|
||||
{
|
||||
MainThreadEntry* self = (MainThreadEntry*)_userData;
|
||||
int32_t result = _main_(self->m_argc, self->m_argv);
|
||||
int32_t result = main(self->m_argc, self->m_argv);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,22 +3,19 @@
|
|||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <bx/bx.h>
|
||||
#include "entry.h"
|
||||
|
||||
#if BX_PLATFORM_OSX
|
||||
|
||||
#include <bgfxplatform.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "entry_p.h"
|
||||
#include <bx/uint32_t.h>
|
||||
#include <bx/thread.h>
|
||||
|
||||
#include "entry_p.h"
|
||||
#include "dbg.h"
|
||||
|
||||
#define DEFAULT_WIDTH 1280
|
||||
#define DEFAULT_HEIGHT 720
|
||||
|
||||
extern int _main_(int _argc, char** _argv);
|
||||
|
||||
@interface AppDelegate : NSObject<NSApplicationDelegate>
|
||||
{
|
||||
bool terminated;
|
||||
|
@ -136,7 +133,7 @@ namespace entry
|
|||
static int32_t threadFunc(void* _userData)
|
||||
{
|
||||
MainThreadEntry* self = (MainThreadEntry*)_userData;
|
||||
return _main_(self->m_argc, self->m_argv);
|
||||
return main(self->m_argc, self->m_argv);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ struct InputBinding
|
|||
const void* m_userData;
|
||||
};
|
||||
|
||||
#define INPUT_BINDING_END { entry::Key::None, entry::Modifier::None, NULL, NULL }
|
||||
#define INPUT_BINDING_END { entry::Key::None, entry::Modifier::None, 0, NULL, NULL }
|
||||
|
||||
///
|
||||
void inputAddBindings(const char* _name, const InputBinding* _bindings);
|
||||
|
|
|
@ -45,9 +45,6 @@ namespace bgfx
|
|||
} // namespace bgfx
|
||||
|
||||
#elif BX_PLATFORM_OSX
|
||||
# include <Cocoa/Cocoa.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
void osxSetNSWindow(void* _window);
|
||||
|
|
Loading…
Reference in a new issue