Skip to content

Commit

Permalink
Undo help menu addition (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
RMichelsen authored and Rasmus Michelsen committed Sep 7, 2022
1 parent c5d016c commit 0f53d69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

project(Nvy)
add_executable(Nvy "resources/third_party/nvim_icon.rc")
add_executable(Nvy WIN32 "resources/third_party/nvim_icon.rc")

set(Nvy_HEADERS
"src/common/dx_helper.h"
Expand Down
15 changes: 2 additions & 13 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,8 @@ BOOL ShouldUseDarkMode()
return false;
}

int main(int argc, char **argv) {
int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, PWSTR p_cmd_line, int n_cmd_show) {
SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
HINSTANCE instance = GetModuleHandle(NULL);

int n_args;
LPWSTR *cmd_line_args = CommandLineToArgvW(GetCommandLineW(), &n_args);
Expand All @@ -372,17 +371,7 @@ int main(int argc, char **argv) {

// Skip argv[0]
for(int i = 1; i < n_args; ++i) {
if(!wcscmp(cmd_line_args[i], L"--help")) {
printf("Usage:\n");
printf("Nvy file [--option]\n");
printf("Nvy --maximize\n to start in fullscreen\n");
printf("Nvy --geometry=<cols>x<rows>\n to start with a given number of rows and columns, e.g. --geometry=80x25\n");
printf("Nvy --disable-ligatures\n to disable font ligatures\n");
printf("Nvy --linespace-factor=<float>\n to scale the line spacing by a floating point factor, e.g. --linespace-factor=1.2\n");
printf("Nvy --help\n to show this menu\n");
return 1;
}
else if(!wcscmp(cmd_line_args[i], L"--maximize")) {
if(!wcscmp(cmd_line_args[i], L"--maximize")) {
start_maximized = true;
}
else if(!wcscmp(cmd_line_args[i], L"--disable-ligatures")) {
Expand Down

0 comments on commit 0f53d69

Please sign in to comment.