1414#include < QtGui>
1515
1616#include < nall/config.hpp>
17+ #include < nall/detect.hpp>
1718#include < nall/platform.hpp>
1819#include < nall/string.hpp>
1920using namespace nall ;
@@ -22,15 +23,21 @@ const uint32_t *colortable;
2223configuration *config;
2324
2425#include " direct/direct.cpp"
25- #include " pixellate2x/pixellate2x.cpp"
26- #include " scale2x/scale2x.cpp"
27- #include " 2xsai/2xsai.cpp"
28- #include " lq2x/lq2x.cpp"
29- #include " hq2x/hq2x.cpp"
3026#include " ntsc/ntsc.cpp"
27+ #if !defined(PLATFORM_OSX)
28+ #include " pixellate2x/pixellate2x.cpp"
29+ #include " scale2x/scale2x.cpp"
30+ #include " 2xsai/2xsai.cpp"
31+ #include " lq2x/lq2x.cpp"
32+ #include " hq2x/hq2x.cpp"
33+ #endif
3134
3235bsnesexport const char * snesfilter_supported () {
33- return " Pixellate2x;Scale2x;2xSaI;Super 2xSaI;Super Eagle;LQ2x;HQ2x;NTSC" ;
36+ #if defined(PLATFORM_OSX)
37+ return " NTSC" ;
38+ #else
39+ return " Pixellate2x;Scale2x;2xSaI;Super 2xSaI;Super Eagle;LQ2x;HQ2x;NTSC" ;
40+ #endif
3441}
3542
3643bsnesexport void snesfilter_configuration (configuration &config_) {
@@ -47,14 +54,18 @@ bsnesexport void snesfilter_colortable(const uint32_t *colortable_) {
4754bsnesexport void snesfilter_size (unsigned filter, unsigned &outwidth, unsigned &outheight, unsigned width, unsigned height) {
4855 switch (filter) {
4956 default : return filter_direct.size (outwidth, outheight, width, height);
50- case 1 : return filter_pixellate2x.size (outwidth, outheight, width, height);
51- case 2 : return filter_scale2x.size (outwidth, outheight, width, height);
52- case 3 : return filter_2xsai.size (outwidth, outheight, width, height);
53- case 4 : return filter_super2xsai.size (outwidth, outheight, width, height);
54- case 5 : return filter_supereagle.size (outwidth, outheight, width, height);
55- case 6 : return filter_lq2x.size (outwidth, outheight, width, height);
56- case 7 : return filter_hq2x.size (outwidth, outheight, width, height);
57- case 8 : return filter_ntsc.size (outwidth, outheight, width, height);
57+ #if defined(PLATFORM_OSX)
58+ case 1 : return filter_ntsc.size (outwidth, outheight, width, height);
59+ #else
60+ case 1 : return filter_pixellate2x.size (outwidth, outheight, width, height);
61+ case 2 : return filter_scale2x.size (outwidth, outheight, width, height);
62+ case 3 : return filter_2xsai.size (outwidth, outheight, width, height);
63+ case 4 : return filter_super2xsai.size (outwidth, outheight, width, height);
64+ case 5 : return filter_supereagle.size (outwidth, outheight, width, height);
65+ case 6 : return filter_lq2x.size (outwidth, outheight, width, height);
66+ case 7 : return filter_hq2x.size (outwidth, outheight, width, height);
67+ case 8 : return filter_ntsc.size (outwidth, outheight, width, height);
68+ #endif
5869 }
5970}
6071
@@ -64,20 +75,29 @@ bsnesexport void snesfilter_render(
6475) {
6576 switch (filter) {
6677 default : return filter_direct.render (output, outpitch, input, pitch, width, height);
67- case 1 : return filter_pixellate2x.render (output, outpitch, input, pitch, width, height);
68- case 2 : return filter_scale2x.render (output, outpitch, input, pitch, width, height);
69- case 3 : return filter_2xsai.render (output, outpitch, input, pitch, width, height);
70- case 4 : return filter_super2xsai.render (output, outpitch, input, pitch, width, height);
71- case 5 : return filter_supereagle.render (output, outpitch, input, pitch, width, height);
72- case 6 : return filter_lq2x.render (output, outpitch, input, pitch, width, height);
73- case 7 : return filter_hq2x.render (output, outpitch, input, pitch, width, height);
74- case 8 : return filter_ntsc.render (output, outpitch, input, pitch, width, height);
78+ #if defined(PLATFORM_OSX)
79+ case 1 : return filter_ntsc.render (output, outpitch, input, pitch, width, height);
80+ #else
81+ case 1 : return filter_pixellate2x.render (output, outpitch, input, pitch, width, height);
82+ case 2 : return filter_scale2x.render (output, outpitch, input, pitch, width, height);
83+ case 3 : return filter_2xsai.render (output, outpitch, input, pitch, width, height);
84+ case 4 : return filter_super2xsai.render (output, outpitch, input, pitch, width, height);
85+ case 5 : return filter_supereagle.render (output, outpitch, input, pitch, width, height);
86+ case 6 : return filter_lq2x.render (output, outpitch, input, pitch, width, height);
87+ case 7 : return filter_hq2x.render (output, outpitch, input, pitch, width, height);
88+ case 8 : return filter_ntsc.render (output, outpitch, input, pitch, width, height);
89+ #endif
7590 }
7691}
7792
7893bsnesexport QWidget* snesfilter_settings (unsigned filter) {
7994 switch (filter) {
8095 default : return 0 ;
81- case 8 : return filter_ntsc.settings ();
96+ #if defined(PLATFORM_OSX)
97+ case 1 :
98+ #else
99+ case 8 :
100+ #endif
101+ return filter_ntsc.settings ();
82102 }
83103}
0 commit comments