-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reimplement multi gba patch #81
base: splitscreen
Are you sure you want to change the base?
Conversation
core1->reset(core1); | ||
_setupMaps(core1); | ||
core2->reset(core2); | ||
_setupMaps(core2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm about 80% sure calling this function four times will leak memory or otherwise misbehave. You're hardcoding core1 anyways, remove the other three calls. The resets are fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the setupMaps stuff?
I just did everything 4x but I wasn't sure of that yeah
_setupMaps(core); | ||
|
||
core1->reset(core1); | ||
_setupMaps(core1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, why is this called from two different places, is that really correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this retro_load_game? I'm just following the original core here
core1->saveState(core1, tmp); | ||
memcpy(data, tmp, tmp_size); | ||
free(tmp); | ||
tmp = malloc(tmp_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't say freeing and immediately allocating a new one makes much sense, but I guess it does no harm either?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeah considering it's the same size you're right
I think in core1->deinit(core1); if may free the memory allocated to the game already so that may be why it crashes? |
Link API is probably gonna be rewritten soonish so it may make sense to lay off the link implementation for a bit. |
Thanks for the heads-up I just wanted to get the "multi-core core" working first I have no idea on how to implement the API anyhow :) |
No description provided.