add ps_fopen to properly handle fopen on Windows

fixes #22
This commit is contained in:
tildearrow 2022-01-20 05:04:03 -05:00
parent 06dfb7e803
commit 8ab97a959c
8 changed files with 35 additions and 10 deletions

View file

@ -1,6 +1,7 @@
#include "engine.h"
#include "wavetable.h"
#include "../ta-log.h"
#include "../fileutils.h"
void DivWavetable::putWaveData(SafeWriter* w) {
w->write("WAVE",4);
@ -30,7 +31,7 @@ bool DivWavetable::save(const char* path) {
putWaveData(w);
FILE* outFile=fopen(path,"wb");
FILE* outFile=ps_fopen(path,"wb");
if (outFile==NULL) {
logE("could not save wavetable: %s!\n",strerror(errno));
w->finish();