2014-12-17 18:13:05 +00:00
|
|
|
//
|
|
|
|
// Copyright (c) 2014 Karen Tsai (angelXwind). All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2021-08-06 08:30:30 +00:00
|
|
|
#include "emulator.h"
|
|
|
|
#include "log/LogManager.h"
|
|
|
|
#include "rend/gui.h"
|
2014-12-17 18:13:05 +00:00
|
|
|
|
2020-01-31 22:51:12 +00:00
|
|
|
int darw_printf(const char* text,...)
|
2019-08-09 10:00:48 +00:00
|
|
|
{
|
2015-08-10 01:02:59 +00:00
|
|
|
va_list args;
|
2018-08-20 11:36:34 +00:00
|
|
|
|
2020-01-31 22:51:12 +00:00
|
|
|
char temp[2048];
|
2015-08-10 01:02:59 +00:00
|
|
|
va_start(args, text);
|
2019-08-09 10:00:48 +00:00
|
|
|
vsnprintf(temp, sizeof(temp), text, args);
|
2015-08-10 01:02:59 +00:00
|
|
|
va_end(args);
|
2018-08-20 11:36:34 +00:00
|
|
|
|
2015-08-10 01:02:59 +00:00
|
|
|
NSLog(@"%s", temp);
|
2018-08-20 11:36:34 +00:00
|
|
|
|
2015-08-10 01:02:59 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-12-17 18:13:05 +00:00
|
|
|
void os_DoEvents() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void os_SetWindowText(const char* t) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void os_CreateWindow() {
|
2021-08-06 08:30:30 +00:00
|
|
|
}
|
2014-12-17 18:13:05 +00:00
|
|
|
|
2021-08-06 08:30:30 +00:00
|
|
|
void UpdateInputState() {
|
2014-12-17 18:13:05 +00:00
|
|
|
}
|
|
|
|
|
2021-08-06 08:30:30 +00:00
|
|
|
std::string os_Locale(){
|
|
|
|
return [[[NSLocale preferredLanguages] objectAtIndex:0] UTF8String];
|
2018-08-20 11:36:34 +00:00
|
|
|
}
|
|
|
|
|
2021-08-06 08:30:30 +00:00
|
|
|
std::string os_PrecomposedString(std::string string){
|
|
|
|
return [[[NSString stringWithUTF8String:string.c_str()] precomposedStringWithCanonicalMapping] UTF8String];
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void emu_dc_term(void)
|
|
|
|
{
|
|
|
|
if (dc_is_running())
|
|
|
|
dc_exit();
|
|
|
|
dc_term();
|
|
|
|
LogManager::Shutdown();
|
|
|
|
}
|
2018-08-20 11:36:34 +00:00
|
|
|
|
2021-08-06 08:30:30 +00:00
|
|
|
extern "C" void emu_gui_open(void)
|
|
|
|
{
|
|
|
|
if (!gui_is_open())
|
|
|
|
gui_open_settings();
|
2014-12-17 18:13:05 +00:00
|
|
|
}
|