Skip to content

Commit

Permalink
🎨 apply clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
XK9274 authored and actions-user committed Oct 18, 2023
1 parent f94945a commit 975e769
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/tweaks/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void network_loadState(void)
{
if (network_state.loaded)
return;

network_state.smbd = config_flag_get(".smbdState");
network_state.http = config_flag_get(".httpState");
network_state.ssh = config_flag_get(".sshState");
Expand All @@ -77,11 +77,10 @@ void network_loadState(void)
network_state.keep_alive = config_flag_get(".keepServicesAlive");
network_state.vncserv = config_flag_get(".vncServer");
network_state.loaded = true;

// netset
if (network_settings.loaded)
return;


config_get(".vncfps", CONFIG_INT, &network_settings.vncfps);
network_settings.loaded = true;
Expand Down Expand Up @@ -362,17 +361,19 @@ void network_toggleVNC(void *pt)
int result = system(command_start);
if (result == 0) {
fprintf(stderr, "VNC enabled\n");
} else {
}
else {
fprintf(stderr, "VNC failed to start\n");
}
}
} else {
}
else {
if (process_isRunning("vncserver")) {
int result = system(command_stop);
if (result == 0) {
fprintf(stderr, "VNC disabled\n");
}
}
}
}
}

network_setState(&network_state.vncserv, ".vncServer", ((ListItem *)pt)->value);
Expand Down Expand Up @@ -615,12 +616,12 @@ void menu_vnc(void *pt)
.label = "IP address: N/A",
.disabled = true,
.action = NULL});
list_addItem(&_menu_vnc,
(ListItem){
.label = "Enable",
.item_type = TOGGLE,
.value = (int)network_state.vncserv,
.action = network_toggleVNC});
list_addItem(&_menu_vnc,
(ListItem){
.label = "Enable",
.item_type = TOGGLE,
.value = (int)network_state.vncserv,
.action = network_toggleVNC});
list_addItemWithInfoNote(&_menu_vnc,
(ListItem){
.label = "Framerate",
Expand All @@ -639,7 +640,7 @@ void menu_vnc(void *pt)

void menu_network(void *_)
{
if (!_menu_network._created) {
if (!_menu_network._created) {
_menu_network = list_create(9, LIST_SMALL);
strcpy(_menu_network.title, "Network");

Expand Down

0 comments on commit 975e769

Please sign in to comment.