MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / run

Method run

utility/godot_mono_decomp_wrapper.cpp:114–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 void run(void *p_userdata) override {
115 GodotMonoDecompWrapper *wrapper = (GodotMonoDecompWrapper *)p_userdata;
116 if (wrapper->decompilerHandle == nullptr) {
117 ERR_PRINT("Decompiler handle is null");
118 err = ERR_CANT_CREATE;
119 return;
120 }
121 CharString outputCSProjectPath_chrstr = outputCSProjectPath.utf8();
122 const char *outputCSProjectPath_c = outputCSProjectPath_chrstr.get_data();
123 Vector<CharString> excludeFiles_chrstrrs;
124 excludeFiles_chrstrrs.resize(excludeFiles.size());
125 const char **excludeFiles_c_array = new const char *[excludeFiles.size()];
126 for (int i = 0; i < excludeFiles.size(); i++) {
127 excludeFiles_chrstrrs.write[i] = excludeFiles[i].utf8();
128 excludeFiles_c_array[i] = excludeFiles_chrstrrs[i].get_data();
129 }
130
131 int result = GodotMonoDecomp_DecompileModuleWithProgress(wrapper->decompilerHandle, outputCSProjectPath_c, excludeFiles_c_array, excludeFiles.size(), &DecompileModuleTaskData::_progress_callback, this);
132 delete[] excludeFiles_c_array;
133 if (result != 0 && !cancelled) {
134 err = ERR_CANT_CREATE;
135 }
136 }
137
138 virtual ~DecompileModuleTaskData() = default;
139};

Callers

nothing calls this directly

Calls 3

get_dataMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected