Command line outputs: use ps_fopen to support unicode filenames
This commit is contained in:
parent
c757be6ea2
commit
8cd283c4e9
|
|
@ -857,7 +857,7 @@ int main(int argc, char** argv) {
|
||||||
if (cmdOutName!="") {
|
if (cmdOutName!="") {
|
||||||
SafeWriter* w=e.saveCommand();
|
SafeWriter* w=e.saveCommand();
|
||||||
if (w!=NULL) {
|
if (w!=NULL) {
|
||||||
FILE* f=fopen(cmdOutName.c_str(),"wb");
|
FILE* f=ps_fopen(cmdOutName.c_str(),"wb");
|
||||||
if (f!=NULL) {
|
if (f!=NULL) {
|
||||||
fwrite(w->getFinalBuf(),1,w->size(),f);
|
fwrite(w->getFinalBuf(),1,w->size(),f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
@ -873,7 +873,7 @@ int main(int argc, char** argv) {
|
||||||
if (vgmOutName!="") {
|
if (vgmOutName!="") {
|
||||||
SafeWriter* w=e.saveVGM(NULL,true,0x171,false,vgmOutDirect);
|
SafeWriter* w=e.saveVGM(NULL,true,0x171,false,vgmOutDirect);
|
||||||
if (w!=NULL) {
|
if (w!=NULL) {
|
||||||
FILE* f=fopen(vgmOutName.c_str(),"wb");
|
FILE* f=ps_fopen(vgmOutName.c_str(),"wb");
|
||||||
if (f!=NULL) {
|
if (f!=NULL) {
|
||||||
fwrite(w->getFinalBuf(),1,w->size(),f);
|
fwrite(w->getFinalBuf(),1,w->size(),f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
@ -895,7 +895,7 @@ int main(int argc, char** argv) {
|
||||||
e.setConsoleMode(true);
|
e.setConsoleMode(true);
|
||||||
SafeWriter* w=e.saveText(false);
|
SafeWriter* w=e.saveText(false);
|
||||||
if (w!=NULL) {
|
if (w!=NULL) {
|
||||||
FILE* f=fopen(txtOutName.c_str(),"wb");
|
FILE* f=ps_fopen(txtOutName.c_str(),"wb");
|
||||||
if (f!=NULL) {
|
if (f!=NULL) {
|
||||||
fwrite(w->getFinalBuf(),1,w->size(),f);
|
fwrite(w->getFinalBuf(),1,w->size(),f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue