Fix #183
This commit is contained in:
parent
f1b578fd2e
commit
970a5f562b
@ -1,6 +1,10 @@
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
void pair(size_t count, uint8_t byte)
|
||||
{
|
||||
@ -37,6 +41,11 @@ int main(int argc, char *argv[])
|
||||
int new;
|
||||
size_t position = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
_setmode(0,_O_BINARY);
|
||||
_setmode(1,_O_BINARY);
|
||||
#endif
|
||||
|
||||
while ((new = getchar()) != EOF) {
|
||||
if (byte == new) {
|
||||
count++;
|
||||
|
9
Makefile
9
Makefile
@ -13,8 +13,11 @@ ifneq ($(findstring MSYS,$(PLATFORM)),)
|
||||
PLATFORM := windows32
|
||||
endif
|
||||
|
||||
LOGO_COMPRESS := build/logo-compress
|
||||
|
||||
ifeq ($(PLATFORM),windows32)
|
||||
_ := $(shell chcp 65001)
|
||||
LOGO_COMPRESS := build/logo-compress.exe
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),Darwin)
|
||||
@ -326,10 +329,10 @@ $(OBJ)/%.1bpp: %.png
|
||||
-@$(MKDIR) -p $(dir $@)
|
||||
rgbgfx -d 1 -h -o $@ $<
|
||||
|
||||
$(OBJ)/BootROMs/SameBoyLogo.rle: $(OBJ)/BootROMs/SameBoyLogo.1bpp build/logo-compress
|
||||
./build/logo-compress < $< > $@
|
||||
$(OBJ)/BootROMs/SameBoyLogo.rle: $(OBJ)/BootROMs/SameBoyLogo.1bpp $(LOGO_COMPRESS)
|
||||
$(realpath $(LOGO_COMPRESS)) < $< > $@
|
||||
|
||||
build/logo-compress: BootROMs/logo-compress.c
|
||||
$(LOGO_COMPRESS): BootROMs/logo-compress.c
|
||||
$(CC) $< -o $@
|
||||
|
||||
$(BIN)/BootROMs/agb_boot.bin: BootROMs/cgb_boot.asm
|
||||
|
Loading…
Reference in New Issue
Block a user