Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/yabause/src/cocoa/main.m
2 views
1
/* Copyright 2010, 2012 Lawrence Sebald
2
3
This file is part of Yabause.
4
5
Yabause is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
Yabause is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with Yabause; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
20
#import <Cocoa/Cocoa.h>
21
#include <dispatch/dispatch.h>
22
23
#include "yui.h"
24
#include "peripheral.h"
25
#include "m68kcore.h"
26
#include "m68kc68k.h"
27
#include "permacjoy.h"
28
#include "sndmac.h"
29
#include "vidogl.h"
30
#include "vidsoft.h"
31
#include "vidgcd.h"
32
#include "cs0.h"
33
#include "vdp2.h"
34
35
#include "PerCocoa.h"
36
#include "YabauseController.h"
37
#include "YabauseGLView.h"
38
39
M68K_struct *M68KCoreList[] = {
40
&M68KDummy,
41
&M68KC68K,
42
NULL
43
};
44
45
SH2Interface_struct *SH2CoreList[] = {
46
&SH2Interpreter,
47
&SH2DebugInterpreter,
48
NULL
49
};
50
51
PerInterface_struct *PERCoreList[] = {
52
&PERDummy,
53
&PERCocoa,
54
&PERMacJoy,
55
NULL
56
};
57
58
CDInterface *CDCoreList[] = {
59
&DummyCD,
60
&ISOCD,
61
&ArchCD,
62
NULL
63
};
64
65
SoundInterface_struct *SNDCoreList[] = {
66
&SNDDummy,
67
&SNDMac,
68
NULL
69
};
70
71
VideoInterface_struct *VIDCoreList[] = {
72
&VIDDummy,
73
&VIDOGL,
74
&VIDSoft,
75
&VIDGCD,
76
NULL
77
};
78
79
void YuiErrorMsg(const char *string) {
80
NSString *str = [NSString stringWithUTF8String:string];
81
dispatch_async(dispatch_get_main_queue(), ^{
82
NSRunAlertPanel(@"Yabause Error", str, @"OK", NULL, NULL);
83
});
84
}
85
86
void YuiSetVideoAttribute(int type, int val) {
87
}
88
89
int YuiSetVideoMode(int width, int height, int bpp, int fullscreen) {
90
return 0;
91
}
92
93
void YuiSwapBuffers(void) {
94
[[controller view] setNeedsDisplay:YES];
95
}
96
97
int main(int argc, char *argv[]) {
98
return NSApplicationMain(argc, (const char **) argv);
99
}
100
101