Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ engine/compilers/Make-32bit/Debug/
engine/compilers/Make-32bit/Release/
engine/compilers/Make-64bit/Debug/
engine/compilers/Make-64bit/Release/
*build*/
2 changes: 1 addition & 1 deletion engine/lib/libogg/include/ogg/config_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ typedef unsigned short ogg_uint16_t;
typedef int ogg_int32_t;
typedef unsigned int ogg_uint32_t;
typedef long long ogg_int64_t;
#endif
#endif
4 changes: 4 additions & 0 deletions engine/lib/zlib/gzguts.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
# define WIDECHAR
#endif

#if defined(__APPLE__)
# include <unistd.h>
#endif

#ifdef WINAPI_FAMILY
# define open _open
# define read _read
Expand Down
2 changes: 1 addition & 1 deletion engine/source/math/mMathSSE.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ extern "C"
void SSE_MatrixF_x_MatrixF_Aligned(const F32 *matA, const F32 *matB, F32 *result);
}

#elif defined( TORQUE_COMPILER_GCC ) && (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 ) && !defined(TORQUE_OS_IOS))
#elif defined( TORQUE_COMPILER_GCC ) && (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 ) && !defined(TORQUE_CPU_ARM))
#define ADD_SSE_FN

void SSE_MatrixF_x_MatrixF(const F32 *matA, const F32 *matB, F32 *result)
Expand Down
2 changes: 1 addition & 1 deletion engine/source/platform/platformGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef _PLATFORMGL_H_
// redirect to appropriate platform file
#if defined(TORQUE_OS_OSX)
#include "platformOSX/platformGL.h"
#include "platformOSX/GL/platformGL.h"
#elif defined(TORQUE_OS_WIN)
#include "platformWin32/platformGL.h"
#elif defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD) || defined(TORQUE_OS_FREEBSD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// which contains the workaround.
#include <OpenGL/OpenGL.h>
#include "platformOSX/platformOSX.h"
#include "platformOSX/platformGL.h"
#include "platformGL.h"
#include "console/console.h"
#include "graphics/dgl.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#import "platformOSX/platformOSX.h"
#import "platformOSX/osxOpenGLDevice.h"
#import "platformOSX/platformGL.h"
#import "osxOpenGLDevice.h"
#import "platformGL.h"
#include "console/console.h"
#include "game/gameInterface.h"
#include "graphics/dgl.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#define NO_REDEFINE_GL_FUNCS

#include "platformOSX/platformGL.h"
#include "platformGL.h"
#include "console/console.h"

bool gOutlineEnabled = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

/// Allows outline mode drawing via a function pointer swapping trick.
/// Must be included AFTER all the OpenGL headers.
#include "platformOSX/osxOutlineGL.h"
#include "platformOSX/GL/osxOutlineGL.h"


//------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions engine/source/platformOSX/main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#import <Cocoa/Cocoa.h>
#import "AppDelegate.h"

int main(int argc, char *argv[])
{
[NSApplication sharedApplication];
[NSApp setDelegate: [AppDelegate new]];
return NSApplicationMain(argc, (const char **)argv);
}
2 changes: 1 addition & 1 deletion engine/source/platformOSX/osxCocoaUtilities.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#import "platformOSX/platformOSX.h"
#import "fileDialog.h"
#import "platform/nativeDialogs/fileDialog.h"
#import "osxCocoaUtilities.h"

@implementation NSSavePanel (TorqueFileDialogs)
Expand Down
1 change: 1 addition & 0 deletions engine/source/platformOSX/osxInput.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
//-----------------------------------------------------------------------------
#import "platform/platform.h"
#import "platform/platformInput.h"
#import "platformOSX/platformOSX.h"
#import "platformOSX/osxInputManager.h"
#import "platform/event.h"

Expand Down
1 change: 1 addition & 0 deletions engine/source/platformOSX/osxThread.mm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#import "platform/threads/thread.h"
#import "platform/platformSemaphore.h"
#import "platform/threads/mutex.h"
#import "platformOSX/platformOSX.h"
#import "console/console.h"

//-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion engine/source/platformOSX/osxWindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//-----------------------------------------------------------------------------
#import "platformOSX/platformOSX.h"

#include "platformOSX/osxOpenGLDevice.h"
#include "platformOSX/GL/osxOpenGLDevice.h"


//------------------------------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions engine/source/platformOSX/platformOSX.mm
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ -(void) updateWindowTitle:(const char*)title
- (void)setWindowSize:(int)width height:(int)height
{
// Store the width and height in the state
_windowSize.x = width;
_windowSize.y = height;

_windowSize.x = width * NSScreen.mainScreen.backingScaleFactor; // TODO: See if there's a better solution than this - WageCrusader
_windowSize.y = height * NSScreen.mainScreen.backingScaleFactor; // TODO: See if there's a better solution than this - WageCrusader
// Get the window's current frame
NSRect frame = NSMakeRect([_window frame].origin.x, [_window frame].origin.y, width, height);

Expand Down
Loading