mirror of https://github.com/encounter/aurora.git
Add aurora_get_backend and aurora_get_available_backends
This commit is contained in:
parent
5f06d873bc
commit
9fe0cff6e3
|
@ -2,12 +2,14 @@
|
|||
#define AURORA_AURORA_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
extern "C" {
|
||||
#else
|
||||
#include "stdint.h"
|
||||
#include "stdbool.h"
|
||||
#include "stddef.h"
|
||||
#include "stdint.h"
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
|
@ -72,6 +74,9 @@ const AuroraEvent* aurora_update();
|
|||
bool aurora_begin_frame();
|
||||
void aurora_end_frame();
|
||||
|
||||
AuroraBackend aurora_get_backend();
|
||||
const AuroraBackend* aurora_get_available_backends(size_t* count);
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define AURORA_GFX_DEBUG_GROUPS
|
||||
#endif
|
||||
|
|
|
@ -108,6 +108,7 @@ static AuroraInfo initialize(int argc, char* argv[], const AuroraConfig& config)
|
|||
if (aurora_begin_frame()) {
|
||||
g_initialFrame = true;
|
||||
}
|
||||
g_config.desiredBackend = selectedBackend;
|
||||
return {
|
||||
.backend = selectedBackend,
|
||||
.configPath = g_config.configPath,
|
||||
|
@ -213,3 +214,8 @@ void aurora_shutdown() { aurora::shutdown(); }
|
|||
const AuroraEvent* aurora_update() { return aurora::update(); }
|
||||
bool aurora_begin_frame() { return aurora::begin_frame(); }
|
||||
void aurora_end_frame() { aurora::end_frame(); }
|
||||
AuroraBackend aurora_get_backend() { return aurora::g_config.desiredBackend; }
|
||||
const AuroraBackend* aurora_get_available_backends(size_t* count) {
|
||||
*count = aurora::PreferredBackendOrder.size();
|
||||
return aurora::PreferredBackendOrder.data();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue