Panda3DS/src/main.cpp
Wunkolo ceff20f57f Add configurable Renderer backend
There are still some initialization errors to work through, such as
config not being initialized properly by the time GPU tries to utilize
it too. Also some life-time issues. But manually forcing it to use the
Null backnd successfully works and allows games to be "played"
headlessly.
2023-07-17 10:13:34 -07:00

19 lines
No EOL
482 B
C++

#include "emulator.hpp"
int main(int argc, char *argv[]) {
Emulator emu;
emu.initGraphicsContext();
if (argc > 1) {
auto romPath = std::filesystem::current_path() / argv[1];
if (!emu.loadROM(romPath)) {
// For some reason just .c_str() doesn't show the proper path
Helpers::panic("Failed to load ROM file: %s", romPath.string().c_str());
}
} else {
printf("No ROM inserted! Load a ROM by dragging and dropping it into the emulator window!\n");
}
emu.run();
}