Error with Iterator Patch
Opened this issue · 6 comments
There's an error when applying the iterator patch on commits recommended commits 81fc9fa1dc9162cb50e77ab5f7d7085eb3c4bc9e
28f56e2cbf03a164741f2eade17f9515f887482c
Here's the log for 81fc9fa1dc9162cb50e77ab5f7d7085eb3c4bc9e
git apply modules/godex/patches/add_custom_iterator.patch --reject --ignore-space-change --ignore-whitespace
Checking patch SConstruct...
Hunk #1 succeeded at 581 (offset 38 lines).
Checking patch core/config/engine.h...
Checking patch main/main.cpp...
error: while searching for:
}
/* todo restore
OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
*/
GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2);
GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3);
error: patch failed: main/main.cpp:1284
Hunk #2 succeeded at 2465 (offset 1 line).
Hunk #3 succeeded at 2504 (offset 3 lines).
Hunk #4 succeeded at 2537 (offset 3 lines).
Checking patch main/main.h...
Applied patch SConstruct cleanly.
Applied patch core/config/engine.h cleanly.
Applying patch main/main.cpp with 1 reject...
Rejected hunk #1.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Applied patch main/main.h cleanly.
I'll give it a check, maybe I need to update the patch. I'll keep you in loop
Just to confirm. I'm getting the the same issue from a fresh clone. The commit I tried this on is 364ea7f280a3f074795e542b16b1d0ec76cf6ce2
.
I looked at the patch file and it looks like the part in question doesn't do anything except mess with whitespace?
@@ -1284,8 +1284,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
/* todo restore
- OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
- video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
+ OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
+ video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
*/
GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2);
GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3);
the last two lines got moved somewhere else in main which I think is the problem.
@matthew-salerno Youp, that part was doing an useless format fix. I've removed it: https://github.com/GodotECS/godex/blob/main/patches/add_custom_iterator.patch
Wouldn't it make sense to add this custom iterator feature to Godot? Or did you already try and it was rejected?
I've a PR to introduce that feature: godotengine/godot#42875, though Reduz is working on a slightly different solution that works also when using the new GDExtension. Once t
hat's implemented (soon I think), I'll remove this patch.