Deleting try_mem.c

This commit is contained in:
Sergiotarxz 2023-04-03 22:00:50 +02:00
parent 621f57aec0
commit 72e8105510
1 changed files with 0 additions and 40 deletions

View File

@ -1,40 +0,0 @@
#include <pthread.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <mgba/flags.h>
#include <mgba/core/core.h>
#include <mgba/core/thread.h>
#include <mgba/core/interface.h>
#include <mgba-util/vfs.h>
#ifdef M_CORE_GBA
#include <mgba/internal/gba/sio/lockstep.h>
#endif
#ifdef M_CORE_GB
#include <mgba/internal/gb/sio/lockstep.h>
#endif
int main() {
struct mCoreThread *threadContext = malloc(sizeof *threadContext);
char *file = "/home/sergio/ruby.gba";
struct mCore *core = mCoreFind(file);
core->init(core);
unsigned int width;
unsigned int height;
core->desiredVideoDimensions(core, &width, &height);
color_t *outputBuffer = malloc((sizeof *outputBuffer) * width * height);
core->setVideoBuffer(core, outputBuffer, 240);
mCoreInitConfig(core, NULL);
if (!core) {
fprintf(stderr, "Unable to load core");
return 1;
}
mCoreLoadFile(core, file);
threadContext->core = core;
threadContext->userData = NULL;
mCoreThreadStart(threadContext);
mCoreThreadJoin(threadContext);
free(threadContext);
}