mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
Fix Apple M1 OpenGL->Metal and SDL2_sound crashes
This commit is contained in:
parent
4e3b7483a2
commit
c5f8ebef2e
3 changed files with 12 additions and 16 deletions
|
@ -3110,6 +3110,11 @@ static float *get_window(vorb *f, int len)
|
|||
len <<= 1;
|
||||
if (len == f->blocksize_0) return f->window[0];
|
||||
if (len == f->blocksize_1) return f->window[1];
|
||||
|
||||
// I am unsure of what causes it to get this far,
|
||||
// but returning window[0] appeared to work fine.
|
||||
// Just a MKXP change.
|
||||
return f->window[0];
|
||||
assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -245,9 +245,9 @@ $(DOWNLOADS)/openal/CMakeLists.txt:
|
|||
$(CLONE) $(GITLAB)/mkxp-z/openal-soft $(DOWNLOADS)/openal
|
||||
|
||||
# Standard ruby
|
||||
ruby: init_dirs $(LIBDIR)/libruby*.a
|
||||
ruby: init_dirs $(LIBDIR)/libruby.3.0-static.a
|
||||
|
||||
$(LIBDIR)/libruby*.a: $(DOWNLOADS)/ruby/Makefile
|
||||
$(LIBDIR)/libruby.3.0-static.a: $(DOWNLOADS)/ruby/Makefile
|
||||
cd $(DOWNLOADS)/ruby; \
|
||||
make -j$(NPROC); make install
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include <algorithm>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#define DEF_SCREEN_W (rgssVer == 1 ? 640 : 544)
|
||||
|
@ -839,13 +840,8 @@ void Graphics::resizeScreen(int width, int height) {
|
|||
|
||||
int cur_sz = p->scSize.x;
|
||||
shState->eThread().requestWindowResize(width, height);
|
||||
|
||||
// Give things a little time to recalculate before continuing
|
||||
for (int i = 0; i < p->frameRate; i++) {
|
||||
if (cur_sz != p->scSize.x)
|
||||
break;
|
||||
update();
|
||||
}
|
||||
usleep(50000);
|
||||
update();
|
||||
}
|
||||
|
||||
void Graphics::playMovie(const char *filename) {
|
||||
|
@ -928,13 +924,8 @@ void Graphics::setScale(double factor) {
|
|||
|
||||
int cur_sz = p->scSize.x;
|
||||
shState->eThread().requestWindowResize(widthpx, heightpx);
|
||||
|
||||
// Give things a little time to recalculate before continuing
|
||||
for (int i = 0; i < p->frameRate; i++) {
|
||||
if (cur_sz != p->scSize.x)
|
||||
break;
|
||||
update();
|
||||
}
|
||||
usleep(50000);
|
||||
update();
|
||||
}
|
||||
|
||||
bool Graphics::getFrameskip() const { return p->useFrameSkip; }
|
||||
|
|
Loading…
Add table
Reference in a new issue