Adding set frame callback.
This commit is contained in:
parent
0c6847a76c
commit
0aaf6079b0
|
@ -15,6 +15,17 @@ msPacketHelloDestroy(struct msPacketHello **hello) {
|
||||||
*hello = NULL;
|
*hello = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
msThreadCallbackSetFrame(struct mCoreThread *threadContext) {
|
||||||
|
struct msClientConnectionData *data = (struct msClientConnectionData *)threadContext->userData;
|
||||||
|
unsigned int stride = data->coreController->stride;
|
||||||
|
int client_fd = data->clientFd;
|
||||||
|
color_t *outputBuffer = data->coreController->outputBuffer;
|
||||||
|
unsigned width, height;
|
||||||
|
data->coreController->threadContext.core->desiredVideoDimensions(data->coreController->threadContext.core, &width, &height);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
msPacketHelloHandle(const struct msPacket *packet, struct msPacketHello *hello,
|
msPacketHelloHandle(const struct msPacket *packet, struct msPacketHello *hello,
|
||||||
struct msClientConnectionData *const data) {
|
struct msClientConnectionData *const data) {
|
||||||
|
@ -25,6 +36,7 @@ msPacketHelloHandle(const struct msPacket *packet, struct msPacketHello *hello,
|
||||||
}
|
}
|
||||||
printf("Loading game and save for client_fd %d\n", data->clientFd);
|
printf("Loading game and save for client_fd %d\n", data->clientFd);
|
||||||
data->coreController = msCoreControllerLoadGame(hello->rom, hello->size_rom, hello->savestate, hello->size_savestate, data);
|
data->coreController = msCoreControllerLoadGame(hello->rom, hello->size_rom, hello->savestate, hello->size_savestate, data);
|
||||||
|
msCoreControllerSetFrameCallback(data->coreController, &msThreadCallbackSetFrame);
|
||||||
msCoreControllerThreadStart(data->coreController);
|
msCoreControllerThreadStart(data->coreController);
|
||||||
result = true;
|
result = true;
|
||||||
return_ms_packet_hello_handle:
|
return_ms_packet_hello_handle:
|
||||||
|
|
Loading…
Reference in New Issue