Remove unnecessary code for starting the bridge service

This commit is contained in:
EnderIce2 2024-05-29 23:06:16 +03:00
parent 8fbe00b555
commit a640dd5af1
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 3 additions and 18 deletions

17
gui.c
View File

@ -47,20 +47,6 @@ VOID HandleStartButton(BOOL Silent)
return;
}
if (!IsLinux)
{
hBridge = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)CreateBridge,
NULL, 0, NULL);
HWND item = GetDlgItem(hwnd, /* Start Button */ 1);
Button_SetText(item, "Stop");
item = GetDlgItem(hwnd, 4);
SetWindowText(item, "Bridge is running...");
IsAlreadyRunning = TRUE;
ShowWindow(hwnd, SW_MINIMIZE);
return;
}
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
if (hSCManager == NULL)
{
@ -72,7 +58,7 @@ VOID HandleStartButton(BOOL Silent)
SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_START);
if (schService == NULL)
{
// print("OpenService failed: %s\n", GetErrorMessage());
print("Service doesn't exist: %s\n", GetErrorMessage());
/* Service doesn't exist; running without any service */
@ -115,6 +101,7 @@ VOID HandleStartButton(BOOL Silent)
CloseServiceHandle(hSCManager);
if (Silent == FALSE)
MessageBox(NULL, "Bridge service started successfully", "Info", MB_OK);
print("Bridge service started successfully\n");
}
VOID HandleInstallButton()

4
main.c
View File

@ -72,9 +72,7 @@ void DetectWine()
{
int result = MessageBox(NULL, "This program is designed for Linux and macOS only!\nDo you want to proceed?",
NULL, MB_YESNO | MB_ICONQUESTION);
if (result == IDYES)
return;
else if (result == IDNO)
if (result == IDNO)
ExitProcess(1);
}