mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 13:14:21 +01:00
Style: adds BreakBeforeCloseBracketBracedList: true
This commit is contained in:
@@ -14,12 +14,14 @@ const char* ffDetectBluetooth(FFBluetoothOptions* options, FFlist* devices /* FF
|
||||
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(bluetoothapis, BluetoothFindDeviceClose)
|
||||
|
||||
BLUETOOTH_DEVICE_INFO btdi = {
|
||||
.dwSize = sizeof(btdi)};
|
||||
.dwSize = sizeof(btdi)
|
||||
};
|
||||
HBLUETOOTH_DEVICE_FIND hFind = ffBluetoothFindFirstDevice(&(BLUETOOTH_DEVICE_SEARCH_PARAMS) {
|
||||
.fReturnConnected = TRUE,
|
||||
.fReturnRemembered = options->showDisconnected,
|
||||
.fReturnAuthenticated = options->showDisconnected,
|
||||
.dwSize = sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS)},
|
||||
.dwSize = sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS)
|
||||
},
|
||||
&btdi);
|
||||
if (!hFind) {
|
||||
if (GetLastError() == ERROR_NO_MORE_ITEMS) {
|
||||
|
||||
@@ -60,7 +60,8 @@ const char* ffDetectBluetoothRadio(FFlist* devices /* FFBluetoothRadioResult */)
|
||||
|
||||
HANDLE hRadio = NULL;
|
||||
HBLUETOOTH_DEVICE_FIND hFind = ffBluetoothFindFirstRadio(&(BLUETOOTH_FIND_RADIO_PARAMS) {
|
||||
.dwSize = sizeof(BLUETOOTH_FIND_RADIO_PARAMS)},
|
||||
.dwSize = sizeof(BLUETOOTH_FIND_RADIO_PARAMS)
|
||||
},
|
||||
&hRadio);
|
||||
if (!hFind) {
|
||||
if (GetLastError() == ERROR_NO_MORE_ITEMS) {
|
||||
|
||||
@@ -15,7 +15,8 @@ const char* enablePrivilege(const wchar_t* privilege) {
|
||||
TOKEN_PRIVILEGES tp = {
|
||||
.PrivilegeCount = 1,
|
||||
.Privileges = {
|
||||
(LUID_AND_ATTRIBUTES) {.Attributes = SE_PRIVILEGE_ENABLED}},
|
||||
(LUID_AND_ATTRIBUTES) {.Attributes = SE_PRIVILEGE_ENABLED}
|
||||
},
|
||||
};
|
||||
if (!LookupPrivilegeValueW(NULL, privilege, &tp.Privileges[0].Luid)) {
|
||||
return "LookupPrivilegeValue() failed";
|
||||
|
||||
@@ -21,7 +21,8 @@ static const char* spawnProcess(FFCommandOptions* options, FFProcessHandle* hand
|
||||
options->shell.chars,
|
||||
options->param.chars,
|
||||
options->text.chars,
|
||||
NULL}
|
||||
NULL
|
||||
}
|
||||
: (char* const[]) {options->shell.chars, options->text.chars, NULL},
|
||||
options->useStdErr,
|
||||
handle);
|
||||
|
||||
@@ -9,7 +9,8 @@ const char* ffDetectCPU(const FFCPUOptions* options, FFCPUResult* cpu) {
|
||||
}
|
||||
|
||||
const char* removeStrings[] = {
|
||||
" CPU", " FPU", " APU", " Processor", " Dual-Core", " Quad-Core", " Six-Core", " Eight-Core", " Ten-Core", " 2-Core", " 4-Core", " 6-Core", " 8-Core", " 10-Core", " 12-Core", " 14-Core", " 16-Core"};
|
||||
" CPU", " FPU", " APU", " Processor", " Dual-Core", " Quad-Core", " Six-Core", " Eight-Core", " Ten-Core", " 2-Core", " 4-Core", " 6-Core", " 8-Core", " 10-Core", " 12-Core", " 14-Core", " 16-Core"
|
||||
};
|
||||
ffStrbufRemoveStrings(&cpu->name, ARRAY_SIZE(removeStrings), removeStrings);
|
||||
uint32_t radeonGraphics = ffStrbufFirstIndexS(&cpu->name, " w/ Radeon "); // w/ Radeon 780M Graphics
|
||||
if (radeonGraphics >= cpu->name.length) {
|
||||
|
||||
@@ -106,7 +106,8 @@ static void detectDisplays(FFDisplayServerResult* ds) {
|
||||
.size = sizeof(preferredMode),
|
||||
.adapterId = path->targetInfo.adapterId,
|
||||
.id = path->targetInfo.id,
|
||||
}};
|
||||
}
|
||||
};
|
||||
double preferredRefreshRate = 0;
|
||||
if (DisplayConfigGetDeviceInfo(&preferredMode.header) == ERROR_SUCCESS) {
|
||||
DISPLAYCONFIG_RATIONAL freq = preferredMode.targetMode.targetVideoSignalInfo.vSyncFreq;
|
||||
@@ -161,7 +162,8 @@ static void detectDisplays(FFDisplayServerResult* ds) {
|
||||
.size = sizeof(advColorInfo2),
|
||||
.adapterId = path->targetInfo.adapterId,
|
||||
.id = path->targetInfo.id,
|
||||
}};
|
||||
}
|
||||
};
|
||||
if (DisplayConfigGetDeviceInfo(&advColorInfo2.header) == ERROR_SUCCESS) {
|
||||
if (advColorInfo2.highDynamicRangeUserEnabled) {
|
||||
display->hdrStatus = FF_DISPLAY_HDR_STATUS_ENABLED;
|
||||
@@ -178,7 +180,8 @@ static void detectDisplays(FFDisplayServerResult* ds) {
|
||||
.size = sizeof(advColorInfo),
|
||||
.adapterId = path->targetInfo.adapterId,
|
||||
.id = path->targetInfo.id,
|
||||
}};
|
||||
}
|
||||
};
|
||||
if (DisplayConfigGetDeviceInfo(&advColorInfo.header) == ERROR_SUCCESS) {
|
||||
if (advColorInfo.advancedColorEnabled) {
|
||||
display->hdrStatus = FF_DISPLAY_HDR_STATUS_ENABLED;
|
||||
|
||||
@@ -247,7 +247,8 @@ const char* ffdsConnectWayland(FFDisplayServerResult* result) {
|
||||
|
||||
struct wl_registry_listener registry_listener = {
|
||||
.global = waylandGlobalAddListener,
|
||||
.global_remove = (void*) stubListener};
|
||||
.global_remove = (void*) stubListener
|
||||
};
|
||||
|
||||
data.ffwl_proxy_add_listener(registry, (void (**)(void)) ®istry_listener, &data);
|
||||
data.ffwl_display_roundtrip(data.display);
|
||||
|
||||
@@ -246,7 +246,8 @@ static bool xcbRandrHandleMonitor(XcbRandrData* data, xcb_randr_monitor_info_t*
|
||||
xcb_randr_output_iterator_t outputIterator = {
|
||||
.index = 0,
|
||||
.data = data->ffxcb_randr_monitor_info_outputs(monitor),
|
||||
.rem = data->ffxcb_randr_monitor_info_outputs_length(monitor)};
|
||||
.rem = data->ffxcb_randr_monitor_info_outputs_length(monitor)
|
||||
};
|
||||
|
||||
FF_AUTO_FREE xcb_get_atom_name_reply_t* nameReply = data->ffxcb_get_atom_name_reply(
|
||||
data->connection,
|
||||
|
||||
@@ -16,7 +16,8 @@ const char* ffDetectKeyboard(FFlist* devices /* List of FFKeyboardDevice */) {
|
||||
|
||||
FFKeyboardDevice device = {
|
||||
.name = ffStrbufCreate(),
|
||||
.serial = ffStrbufCreate()};
|
||||
.serial = ffStrbufCreate()
|
||||
};
|
||||
|
||||
char* line = NULL;
|
||||
size_t len = 0;
|
||||
|
||||
@@ -44,7 +44,8 @@ const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options) {
|
||||
.rxErrors = stats.receive.errors,
|
||||
.txErrors = stats.send.errors,
|
||||
.rxDrops = stats.receive.dropped,
|
||||
.txDrops = stats.send.dropped};
|
||||
.txDrops = stats.send.dropped
|
||||
};
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -37,7 +37,8 @@ static const char* cglHandlePixelFormat(FFOpenGLResult* result, CGLPixelFormatOb
|
||||
const char* cglDetectOpenGL(FFOpenGLResult* result) {
|
||||
CGLPixelFormatObj pixelFormat;
|
||||
CGLPixelFormatAttribute attrs[] = {
|
||||
kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core, kCGLPFAAccelerated, 0};
|
||||
kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core, kCGLPFAAccelerated, 0
|
||||
};
|
||||
|
||||
GLint num;
|
||||
if (CGLChoosePixelFormat(attrs, &pixelFormat, &num) != kCGLNoError) {
|
||||
|
||||
@@ -41,7 +41,8 @@ static const char* wglHandlePixelFormat(WGLData* wglData, FFOpenGLResult* result
|
||||
.iPixelType = PFD_TYPE_RGBA,
|
||||
.cColorBits = 32,
|
||||
.cDepthBits = 24,
|
||||
.iLayerType = PFD_MAIN_PLANE};
|
||||
.iLayerType = PFD_MAIN_PLANE
|
||||
};
|
||||
int pixelFormat = ChoosePixelFormat(hdc, &pfd);
|
||||
if (pixelFormat == 0) {
|
||||
ReleaseDC(hWnd, hdc);
|
||||
|
||||
@@ -128,7 +128,8 @@ static uint32_t getNixPackagesImpl(char* path) {
|
||||
FFstrbuf line = {
|
||||
.allocated = 0,
|
||||
.length = lineLength,
|
||||
.chars = output.chars + i - lineLength};
|
||||
.chars = output.chars + i - lineLength
|
||||
};
|
||||
if (isValidNixPkg(&line)) {
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -668,11 +668,13 @@ typedef unsigned short oss_peaks_t[MAX_PEAK_CHANNELS];
|
||||
* Again, DO NOT USE the following two macros. They are here for SOURCE
|
||||
* COMPATIBILITY ONLY.
|
||||
*/
|
||||
#define SOUND_DEVICE_LABELS { \
|
||||
"Vol ", "Bass ", "Treble", "Synth", "Pcm ", "Speaker ", "Line ", "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", "Aux1", "Aux2", "Aux3", "Digital1", "Digital2", "Digital3", "Phone", "Mono", "Video", "Radio", "Depth", "Rear", "Center", "Side"}
|
||||
#define SOUND_DEVICE_LABELS { \
|
||||
"Vol ", "Bass ", "Treble", "Synth", "Pcm ", "Speaker ", "Line ", "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", "Aux1", "Aux2", "Aux3", "Digital1", "Digital2", "Digital3", "Phone", "Mono", "Video", "Radio", "Depth", "Rear", "Center", "Side" \
|
||||
}
|
||||
|
||||
#define SOUND_DEVICE_NAMES { \
|
||||
"vol", "bass", "treble", "synth", "pcm", "speaker", "line", "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", "aux1", "aux2", "aux3", "dig1", "dig2", "dig3", "phone", "mono", "video", "radio", "depth", "rear", "center", "side"}
|
||||
#define SOUND_DEVICE_NAMES { \
|
||||
"vol", "bass", "treble", "synth", "pcm", "speaker", "line", "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", "aux1", "aux2", "aux3", "dig1", "dig2", "dig3", "phone", "mono", "video", "radio", "depth", "rear", "center", "side" \
|
||||
}
|
||||
|
||||
#define MIXER_READ(dev) __OSSIOR('M', dev, int)
|
||||
#define MIXER_WRITE(dev) __OSSIOWR('M', dev, int)
|
||||
|
||||
@@ -13,7 +13,7 @@ const char* ffDetectSwap(FFlist* result) {
|
||||
if (xsw.xsu_total == 0) {
|
||||
if (!__builtin_available(macOS 26.0, *)) {
|
||||
if (ffSysctlGetInt("vm.compressor_mode", 4) <= 2) { // No longer available in macOS 26.0
|
||||
return NULL; // Swap is disabled
|
||||
return NULL; // Swap is disabled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,12 +99,14 @@ static const char* detectVulkan(FFVulkanResult* result) {
|
||||
.engineVersion = projectVersion,
|
||||
|
||||
// We need to request 1.1 to get physicalDeviceDriverProperties
|
||||
.apiVersion = instanceVersion.minor >= 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0},
|
||||
.apiVersion = instanceVersion.minor >= 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0
|
||||
},
|
||||
.enabledLayerCount = 0,
|
||||
.ppEnabledLayerNames = NULL,
|
||||
.enabledExtensionCount = 0,
|
||||
.ppEnabledExtensionNames = NULL,
|
||||
.flags = 0},
|
||||
.flags = 0
|
||||
},
|
||||
NULL,
|
||||
&vkInstance);
|
||||
if (res != VK_SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user