src/os/macosx/macos.m
branchcustombridgeheads
changeset 5650 aefc131bf5ce
parent 5643 3778051e8095
equal deleted inserted replaced
5649:55c8267c933f 5650:aefc131bf5ce
     6 #include <mach/mach_host.h>
     6 #include <mach/mach_host.h>
     7 #include <mach/host_info.h>
     7 #include <mach/host_info.h>
     8 #include <mach/machine.h>
     8 #include <mach/machine.h>
     9 #include <stdio.h>
     9 #include <stdio.h>
    10 #include "../../stdafx.h"
    10 #include "../../stdafx.h"
    11 #include "../../openttd.h"
       
    12 #include "../../newgrf.h"
       
    13 #include "../../gfx.h"
       
    14 #include "../../macros.h"
    11 #include "../../macros.h"
    15 #include "../../string.h"
       
    16 
    12 
    17 #ifndef CPU_SUBTYPE_POWERPC_970
    13 #ifndef CPU_SUBTYPE_POWERPC_970
    18 #define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100)
    14 #define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100)
    19 #endif
    15 #endif
    20 
    16 
    23  * Apple uses objective C instead of plain C to interact with OS specific/native functions
    19  * Apple uses objective C instead of plain C to interact with OS specific/native functions
    24  *
    20  *
    25  * Note: TrueLight's crosscompiler can handle this, but it likely needs a manual modification for each change in this file.
    21  * Note: TrueLight's crosscompiler can handle this, but it likely needs a manual modification for each change in this file.
    26  * To insure that the crosscompiler still works, let him try any changes before they are committed
    22  * To insure that the crosscompiler still works, let him try any changes before they are committed
    27  */
    23  */
       
    24 
       
    25 void ToggleFullScreen(bool fs);
    28 
    26 
    29 static char *GetOSString(void)
    27 static char *GetOSString(void)
    30 {
    28 {
    31 	static char buffer[175];
    29 	static char buffer[175];
    32 	const char* CPU;
    30 	const char* CPU;
    72 
    70 
    73 		sprintf(OS, "%d%d.%d.%d", majorHiNib, majorLoNib, minorNib, bugNib);
    71 		sprintf(OS, "%d%d.%d.%d", majorHiNib, majorLoNib, minorNib, bugNib);
    74 	}
    72 	}
    75 
    73 
    76 	// make a list of used newgrf files
    74 	// make a list of used newgrf files
    77 	if (_first_grffile != NULL) {
    75 /*	if (_first_grffile != NULL) {
    78 		char* n = newgrf;
    76 		char* n = newgrf;
    79 		const GRFFile* file;
    77 		const GRFFile* file;
    80 
    78 
    81 		for (file = _first_grffile; file != NULL; file = file->next) {
    79 		for (file = _first_grffile; file != NULL; file = file->next) {
    82 			n = strecpy(n, " ", lastof(newgrf));
    80 			n = strecpy(n, " ", lastof(newgrf));
    83 			n = strecpy(n, file->filename, lastof(newgrf));
    81 			n = strecpy(n, file->filename, lastof(newgrf));
    84 		}
    82 		}
    85 	} else {
    83 	} else {*/
    86 		sprintf(newgrf, "none");
    84 		sprintf(newgrf, "none");
    87 	}
    85 //	}
    88 
    86 
    89 	snprintf(
    87 	snprintf(
    90 		buffer, lengthof(buffer),
    88 		buffer, lengthof(buffer),
    91 		"Please add this info: (tip: copy-paste works)\n"
    89 		"Please add this info: (tip: copy-paste works)\n"
    92 		"CPU: %s, OSX: %s, OpenTTD version: %s\n"
    90 		"CPU: %s, OSX: %s, OpenTTD version: %s\n"