diff --git a/native/src/main.cpp b/native/src/main.cpp index a0c8ff5..d4b40d7 100644 --- a/native/src/main.cpp +++ b/native/src/main.cpp @@ -98,16 +98,16 @@ void OnKeyboardMessage(DWORD key, WORD repeats, BYTE scanCode, BOOL isExtended, { if(key == 'L' && !wasDownBefore && !isUpNow) { - auto f = fopen("depth.raw", "w"); + auto f = fopen("depth.raw", "wb"); void* buf; int size = export_get_depth_buffer(&buf); fwrite(buf, 1, size, f); fclose(f); - f = fopen("stencil.raw", "w"); + f = fopen("stencil.raw", "wb"); size = export_get_stencil_buffer(&buf); fwrite(buf, 1, size, f); fclose(f); - f = fopen("color.raw", "w"); + f = fopen("color.raw", "wb"); size = export_get_color_buffer(&buf); fwrite(buf, 1, size, f); fclose(f); @@ -292,4 +292,4 @@ void presentCallback(void* chain) lastRtv = nullptr; fclose(f); -} \ No newline at end of file +}