Compare commits

..
2 Commits
Author SHA1 Message Date
bicarus 4c2a70bab6 build: improve dockerfile (#881)
## Link to GitHub Issue or related Pull Request, if one exists
#0

## Description of change

`mingw-w64-libjpeg-turbo` and `mingw-w64-x264` are AUR packages, so the
deps image compiles them from source, once per mingw target arch. Stock
`makepkg.conf` leaves `MAKEFLAGS` commented out and both PKGBUILDs call
bare `make`, so all of that was building single-threaded.

Adds a `~/.makepkg.conf` for the build user setting
`MAKEFLAGS="-j$(nproc)"`. It is kept literal so it evaluates when
makepkg sources the file, rather than baking in the core count of
whichever machine built the image. Using `~/.makepkg.conf` rather than
`/etc` leaves the pacman-owned system file untouched.

Measured on 20 cores, compiling both libraries from scratch: **310s to
64s, a 4.8x improvement.**

Also merges the two `yay` invocations into a single layer.

## Testing
2026-08-20 23:25:00 -07:00
bicarus 46f76597fc cfg: active only filter for options search (#879)
Requested by a sea creature
2026-08-20 22:38:30 -07:00
3 changed files with 27 additions and 12 deletions

No files matched your search

+7 -6
View File
@@ -25,10 +25,11 @@ ENV PATH="$PATH:/opt/llvm-mingw-xp/bin"
RUN curl -fsSL "https://github.com/mon/windows-dll-compat-checker/releases/download/v1.3/windows_dll_compat_checker-linux-x86_64.tar.xz" \
| tar -xJ -C /usr/local/bin
# libjpeg-turbo for JPEG encoding. Only the mingw-w64 toolchains get it;
# the WinXP targets build without JPEG support entirely.
RUN su user -c "yay --noconfirm -S mingw-w64-libjpeg-turbo"
# Stock makepkg.conf builds serially; this makes the AUR compiles below parallel.
RUN printf '%s\n' 'MAKEFLAGS="-j$(nproc)"' > /home/user/.makepkg.conf \
&& chown user: /home/user/.makepkg.conf
# x264 for the API H.264 video stream. Only the mingw-w64 toolchains need it;
# the WinXP targets build without the stream encoder.
RUN su user -c "yay --noconfirm -S mingw-w64-x264"
# libjpeg-turbo for JPEG encoding, x264 for the API H.264 video stream. Only the
# mingw-w64 toolchains get these; the WinXP targets build without JPEG support
# and without the stream encoder.
RUN su user -c "yay --noconfirm -S mingw-w64-libjpeg-turbo mingw-w64-x264"
+18 -5
View File
@@ -450,6 +450,8 @@ namespace overlay::windows {
ImGuiInputTextFlags_EscapeClearsAll)) {
this->search_filter_in_lower_case = strtolower(this->search_filter);
}
// clear search terms
if (!this->search_filter.empty()) {
ImGui::SameLine();
if (ImGui::Button("Clear")) {
@@ -457,15 +459,22 @@ namespace overlay::windows {
this->search_filter_in_lower_case.clear();
}
}
// active only checkbox
ImGui::SameLine();
ImGui::Checkbox("Active Only", &this->search_active_only);
ImGui::Spacing();
// draw matching options
if (!this->search_filter.empty()) {
if (!this->search_filter.empty() || this->search_active_only) {
for (auto category : launcher::get_categories(launcher::Options::OptionsCategory::Everything)) {
this->build_options(
options,
category,
const_cast<std::string *>(&this->search_filter_in_lower_case));
const_cast<std::string *>(&this->search_filter_in_lower_case),
false,
this->search_active_only);
}
}
} else if (this->options_group_selected == OPTIONS_TAB_QUICK) {
@@ -5041,7 +5050,8 @@ namespace overlay::windows {
}
void Config::build_options(
std::vector<Option> *options, const std::string &category, const std::string *filter, bool quick_only) {
std::vector<Option> *options, const std::string &category, const std::string *filter,
bool quick_only, bool active_only) {
// collect the options that match the current filters. doing this once lets us
// skip rendering an empty header + table for categories with no matches, and
@@ -5066,8 +5076,11 @@ namespace overlay::windows {
if (!definition.game_name.empty() && definition.game_name != this->games_selected_name) {
continue;
}
if (filter != nullptr) {
if (filter->empty() || !option.search_match(*filter)) {
if (active_only && !option.is_active()) {
continue;
}
if (filter != nullptr && !filter->empty()) {
if (!option.search_match(*filter)) {
continue;
}
// limit to 30 results
+2 -1
View File
@@ -141,6 +141,7 @@ namespace overlay::windows {
int options_category = 0;
std::string search_filter = "";
std::string search_filter_in_lower_case = "";
bool search_active_only = false;
// Options tab left-nav: selected group, currently highlighted category, and a pending scroll
std::string options_group_selected = "";
@@ -216,7 +217,7 @@ namespace overlay::windows {
void build_option_value_picker(Option& option);
void build_options(
std::vector<Option> *options, const std::string &category, const std::string *filter=nullptr,
bool quick_only=false);
bool quick_only=false, bool active_only=false);
void build_options_tab(float page_offset);
void build_controller_tab(float page_offset, ControllerPage *page_selected_new);
bool build_nav_header(const char *label, bool active);