aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-02-14 23:17:44 +0100
committerJohn Ankarström <john@ankarstrom.se>2022-02-14 23:17:44 +0100
commitdbf1e3bf11c74b93c42336000a42a73c7515d7a3 (patch)
tree2938e91dec1cf276eeb8c4084dcc27a77943b62a
parentf39d414332e15c6406951f7684ef4b5ada7e7414 (diff)
downloadEpisodeBrowser-dbf1e3bf11c74b93c42336000a42a73c7515d7a3.tar.gz
Stop command prompt from appearing.
-rw-r--r--Makefile5
-rw-r--r--win.c21
2 files changed, 3 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index fc89c68..21d5584 100644
--- a/Makefile
+++ b/Makefile
@@ -7,13 +7,12 @@ INPUTS += $(PROJECT_ROOT)local_episodes.pl
INPUTS += $(PROJECT_ROOT)episode_data.pl
CFLAGS += -DUNICODE -D_UNICODE
-CFLAGS += -v -cc-options,-mwindows
LDFLAGS += -lcomctl32 -lgdi32 -luxtheme
ifeq ($(BUILD_MODE),debug)
CFLAGS += -g
else ifeq ($(BUILD_MODE),run)
- CFLAGS += -O2
+ CFLAGS += -O2 -ld-options,-mwindows
else ifeq ($(BUILD_MODE),linuxtools)
CFLAGS += -g -pg -fprofile-arcs -ftest-coverage
LDFLAGS += -pg -fprofile-arcs -ftest-coverage
@@ -26,7 +25,7 @@ endif
all: episode_browser.exe
episode_browser.exe: $(INPUTS) $(PROJECT_ROOT)Makefile
- swipl-ld $(CFLAGS) $(LDFLAGS) -goal true -o $@ $(INPUTS)
+ swipl-ld -v $(CFLAGS) $(LDFLAGS) -goal true -o $@ $(INPUTS)
$(EXTRA_CMDS)
resource.obj: $(PROJECT_ROOT)resource.h $(PROJECT_ROOT)resource.rc
diff --git a/win.c b/win.c
index b7f79ae..e675f63 100644
--- a/win.c
+++ b/win.c
@@ -11,7 +11,7 @@
HFONT g_GUIFont;
HFONT g_GUIFontBold;
-int g_SelectedItem = -1;
+int g_SelectedItem = -1; /* Remembered after refresh. */
static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
static INT_PTR CALLBACK AboutDlgProc(HWND, UINT, WPARAM, LPARAM);
@@ -27,25 +27,6 @@ static void UpdateList(HWND);
static void ShowEpisode(HWND, int);
static int Watched(int);
-/*
-int main(int argc, char *argv[])
-{
- char *rgArgs[2];
-
- rgArgs[0] = "episode_browser";
- rgArgs[1] = NULL;
-
- if (!PL_initialise(1, rgArgs))
- PL_halt(1);
-
- Attach();
- //UpdateList();
- //ShowEpisode(400);
-
- PL_halt(0);
-}
-*/
-
int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, INT nCmdShow)