Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ helpers-install: $(ICONMAKER) $(APPINFO)

dobby:
@mkdir -p $(DOBBY_DIR)
cd $(DOBBY_DIR) && cmake $(CURDIR)/vendor/dobby \
cd $(DOBBY_DIR) && cmake "$(CURDIR)/vendor/dobby" \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$(MIN_VER) \
-DDOBBY_DEBUG=OFF \
Expand Down
4 changes: 3 additions & 1 deletion dylib/feats/webpatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ static int is_setting_key(const char *str, size_t n) {
}

static int is_setting_value(const char *str, size_t n) {
// ';' joins DXMT_CONFIG's clauses. It is safe inside the JS string this lands in.
for (size_t i = 0; i < n; i++)
if (!is_ident_char((unsigned char)str[i]) && str[i] != '.' && str[i] != '=') return 0;
if (!is_ident_char((unsigned char)str[i]) && str[i] != '.' && str[i] != '='
&& str[i] != ';') return 0;
return 1;
}

Expand Down
6 changes: 6 additions & 0 deletions dylib/tests/gatecheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ static void check_defaults(void) {
"\"DXMT_CONFIG\":\"d3d11.metalSpatialUpscaleFactor=1.5\"},"
"fex:{\"MTL_HUD_ENABLED\":\"0\"}}") != 0)
wrong("the defaults are %s", marker_text(NP_DEFAULTS[0]));
// Frame cap and upscale factor together, which the panel writes as one value.
np_webpatch_set_defaults("DXMT_CONFIG=d3d11.metalSpatialUpscaleFactor=1.5;d3d11.preferredMaxFrameRate=60", "");
if (strcmp(marker_text(NP_DEFAULTS[0]), "{rosetta:{\"DXMT_CONFIG\":"
"\"d3d11.metalSpatialUpscaleFactor=1.5;d3d11.preferredMaxFrameRate=60\"},"
"fex:{}}") != 0)
wrong("a DXMT_CONFIG with two clauses gives %s", marker_text(NP_DEFAULTS[0]));
np_webpatch_set_defaults("FOO=\"});alert(1);({\nwinemsync=1\nWINEMSYNC=1\nNOEQUALS\n=1", "");
if (strcmp(marker_text(NP_DEFAULTS[0]), "{rosetta:{\"WINEMSYNC\":\"1\"},fex:{}}") != 0)
wrong("lines the page cannot take give %s", marker_text(NP_DEFAULTS[0]));
Expand Down