mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-18 03:31:31 +12:00
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.
19 lines
No EOL
482 B
C++
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();
|
|
} |