Carter

Results 61 comments of Carter

> This is an example that fetchs both pixel resolutions, scaled resolutions and refresh rates. > > [LinusDierheimer/fastfetch@`b3da6b0`/src/detection/displayserver/displayserver_windows.c#L48](https://github.com/LinusDierheimer/fastfetch/blob/b3da6b0e89c0decb9ea648e1d98a75fa6ac40225/src/detection/displayserver/displayserver_windows.c#L48) I got an implementation working, thanks for the tip though > There...

Implementation Speeds: - Command used: `hyperfine --warmup 20 --prepare "cmd" --min-runs 500 ".\macchina.exe --show resolution"` - Compiled in release mode Plugged in: - `EnumDisplayDevicesW` - 14.5 ms - `EnumDisplayMonitors` -...

> Besides being slow, WMI `Win32_VideoController` reports one resolution per GPU adapter only. I see no benefits use WMI here. Yeah, I probably should've checked for that before adding it....

> 1. macchina should use the same format on different platforms, including on Windows. That is: `pixelH`x`pixelV`@`refreshRate`fps (as `scaledH`x`scaledV`). However the code [seems to use another format](https://github.com/Macchina-CLI/libmacchina/pull/147/files#diff-3b7ba22f3645054b5b1c07651b4c378e01c0f8eda295e24e4bedf4e6e3a79382R232) Yeah, I probably...

> It has nothing to do with vectors or iterators. You call `EnumDisplayDevicesW`. You get a `DISPLAY_DEVICEW` instance. You pass `DISPLAY_DEVICEW::DeviceName` into `EnumDisplaySettingsW`. You are done. > > [CarterLi/fastfetch@`e5f851d`/src/detection/displayserver/displayserver_windows.c#L49](https://github.com/CarterLi/fastfetch/blob/e5f851dcbb94de35c34fb8c5e3dd8300bb56a1cc/src/detection/displayserver/displayserver_windows.c#L49) I...

> There is actually another method by using HDC and GetDeviceCaps. > > [CarterLi/fastfetch@4d7cb25#diff-1f993416a36137ee7af25d94be4928701d89ca08d9ab322fcb3eb0b5ec6d80b6R39](https://github.com/CarterLi/fastfetch/commit/4d7cb25aa61e5cd06779e126046267edb062cd49#diff-1f993416a36137ee7af25d94be4928701d89ca08d9ab322fcb3eb0b5ec6d80b6R39) > > I dont know if it is faster than EnumDisplayMonitors. The code is much simplier...

I added several alternative implementations Implementation Speeds: - Command used: `hyperfine --warmup 20 --prepare "cmd" --min-runs 200 ".\macchina.exe --show processor"` - Compiled in release mode Plugged in: - `GetLogicalProcessorInformation` -...

> According to [stackoverflow](https://stackoverflow.com/questions/31209256/reliable-way-to-programmatically-get-the-number-of-hardware-threads-on-windows), WMI, registry and GetLogicalProcessorInformationEx are only reliable ways to get the number of cpu logical cores (threads) That does seem to be the case. I've made...

> Just one question, are we absolutely sure that `free` in Windows is `total - used`? From my testing, the free amount seems to match the amount in task manager...

@FolfyBlue if you want to see more information on modget and its development, you can join the official ReviversMC discord server at https://discord.gg/6bTGYFppfz