implement plat_vidapi_name and plat_vidapi so 86box knows about the qt renderers
This commit is contained in:
30
src/qt/qt.c
30
src/qt/qt.c
@@ -3,6 +3,7 @@
|
||||
* implemented in Qt
|
||||
*/
|
||||
|
||||
#include <strings.h>
|
||||
#include <stdint.h>
|
||||
#include <wchar.h>
|
||||
|
||||
@@ -62,9 +63,36 @@ wchar_t* plat_get_string(int i)
|
||||
|
||||
int
|
||||
plat_vidapi(char* api) {
|
||||
if (!strcasecmp(api, "default") || !strcasecmp(api, "system")) {
|
||||
return 0;
|
||||
} else if (!strcasecmp(api, "qt_software")) {
|
||||
return 0;
|
||||
} else if (!strcasecmp(api, "qt_opengl")) {
|
||||
return 1;
|
||||
} else if (!strcasecmp(api, "qt_opengles")) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char* plat_vidapi_name(int api) {
|
||||
return "default";
|
||||
char* name = "default";
|
||||
|
||||
switch (api) {
|
||||
case 0:
|
||||
name = "qt_software";
|
||||
break;
|
||||
case 1:
|
||||
name = "qt_opengl";
|
||||
break;
|
||||
case 2:
|
||||
name = "qt_opengles";
|
||||
break;
|
||||
default:
|
||||
fatal("Unknown renderer: %i\n", api);
|
||||
break;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
Reference in New Issue
Block a user