Skip to content

Commit

Permalink
Merge pull request #3 from pokemonlover1234/main
Browse files Browse the repository at this point in the history
Allow MinGW build to work out-of-box on Windows
  • Loading branch information
ronitsinha committed Oct 25, 2023
2 parents 429ce20 + 5a711e9 commit c895923
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CXX = g++
CXXFLAGS = -Wall -Wextra -Wpedantic -Wshadow
ifeq ($(OS),Windows_NT)
CXXFLAGS += -static
endif
OUTPUT = range_randomizer

all: main
Expand Down
4 changes: 2 additions & 2 deletions romprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using namespace std;

RomProcessor::RomProcessor(const char *in_path, const char *out_path) {
rom_file.open(in_path);
out_file.open(out_path, fstream::in | fstream::out | fstream::trunc);
rom_file.open(in_path, fstream::in | fstream::binary);
out_file.open(out_path, fstream::in | fstream::out | fstream::trunc | fstream::binary);

out_file << rom_file.rdbuf(); out_file.flush(); // copy over file

Expand Down

0 comments on commit c895923

Please sign in to comment.