Update core
This commit is contained in:
parent
2ea4235771
commit
f4b4aa099b
|
@ -12,6 +12,9 @@ int emuInit(EmulationContext *emu) {
|
|||
vbInit(emu->sim);
|
||||
|
||||
emu->ctx = malloc(sizeof(SimContext));
|
||||
emu->ctx->hasFrame = false;
|
||||
emu->ctx->currentSample = 0;
|
||||
vbSetSamples(emu->sim, emu->ctx->samples[emu->ctx->currentSample], VB_S16, 834);
|
||||
vbSetUserData(emu->sim, emu->ctx);
|
||||
vbSetFrameCallback(emu->sim, &onFrame);
|
||||
|
||||
|
@ -56,11 +59,11 @@ bool emuReadPixels(EmulationContext *emu, uint8_t *left, uint8_t *right) {
|
|||
void emuReadSamples(EmulationContext *emu, void **data, uint32_t *bytes) {
|
||||
uint32_t samplePairs;
|
||||
|
||||
*data = vbGetSamples(emu->sim, NULL, &samplePairs);
|
||||
*data = vbGetSamples(emu->sim, NULL, NULL, &samplePairs);
|
||||
*bytes = samplePairs * 4;
|
||||
emu->ctx->currentSample += 1;
|
||||
emu->ctx->currentSample %= 2;
|
||||
vbSetSamples(emu->sim, emu->ctx->samples[emu->ctx->currentSample], 834);
|
||||
vbSetSamples(emu->sim, emu->ctx->samples[emu->ctx->currentSample], VB_S16, 834);
|
||||
}
|
||||
|
||||
void emuSetKeys(EmulationContext *emu, uint16_t keys) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b1349038789c61b41321d6e4ea5d81bdee1eeb44
|
||||
Subproject commit ae22c95dbee3d0b338168bfdf98143e6eddc6c70
|
Loading…
Reference in New Issue