Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems as though *part* of the mk11-gamepad-fix was upstreamed, now fails to apply #24

Closed
gardotd426 opened this issue Aug 27, 2020 · 4 comments

Comments

@gardotd426
Copy link
Contributor

So I was building a new Proton for MK11 and I went to apply the gamepad patch, and it failed. I checked prepare.log, and this was what I saw:

Applying your own patch mk11-gamepad-fix.mypatch
patching file dlls/wbemprox/class.c
Hunk #1 succeeded at 411 with fuzz 2 (offset 295 lines).
Hunk #2 FAILED at 125.
1 out of 2 hunks FAILED -- saving rejects to file dlls/wbemprox/class.c.rej

Offending code:


     *puReturned = 0;
-    if (ec->index >= view->result_count) return WBEM_S_FALSE;
-
-    table = get_view_table( view, ec->index );
-    hr = create_class_object( table->name, iface, ec->index, NULL, apObjects );
-    if (hr != S_OK) return hr;
-
-    ec->index++;
-    *puReturned = 1;
-    if (ec->index == view->result_count && uCount > 1) return WBEM_S_FALSE;
-    if (uCount > 1) return WBEM_S_TIMEDOUT;
+
+    for (i=0; i<uCount; ++i)
+    {
+        if (ec->index >= view->result_count) return WBEM_S_FALSE;
+        table = get_view_table( view, ec->index );
+        hr = create_class_object( table->name, iface, ec->index, NULL, apObjects );
+        if (hr != S_OK) return hr;
+
+        apObjects++;
+        ec->index++;
+        ++*puReturned;
+    }
     return WBEM_S_NO_ERROR;
 }

Which is the second of the two parts of the patch. looking in dlls/wbemprox/class.c, there is almost identical code in that spot:

    if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n");

    *puReturned = 0;

    for (i = 0; i < uCount; i++)
    {
        if (ec->index >= view->result_count) return WBEM_S_FALSE;
        table = get_view_table( view, ec->index );
        hr = create_class_object( table->name, iface, ec->index, NULL, &apObjects[i] );
        if (hr != S_OK)
        {
            for (j = 0; j < i; j++) IWbemClassObject_Release( apObjects[j] );
            return hr;
        }
        ec->index++;
        (*puReturned)++;
    }

    return WBEM_S_NO_ERROR;
}

There are a couple formatting changes and some I-don't-know-if-they're-consequential-but-I'm-sure-you-will extremely minor tweaks that might also just be formatting, but yeah. Figured I'd let you know so you could just chop that part out or whatever else is appropriate, I removed the offending half of the patch and am running the build again, will report if the gamepad works, or doesn't (assuming MK11 actually works for me lol). I didn't want to file a PR because for 1 I'm sure you're sleeping at this time of night in France and 2, I don't know if you even want to just remove that part of the patch. Trying not to create unnecessary hassle for you.

@gardotd426
Copy link
Contributor Author

gardotd426 commented Aug 27, 2020

Welp. I guess it doesn't matter, because the latest update broke MK11 completely anyway.

I've tried with the previous 5.9 TKG build I was using (that definitely worked), as well as GE's 5.11-GE-3-MF which is known to (used to) work.

The little splash window pops up, and stays there forever. You have to kill it to make it go away. DX11 and DX12. AMDVLK and vulkan-amdgpu-pro. I'm going to make a post on the Proton GitHub but it's not as if anyone there will do anything.

EDIT: Okay, nvm about it being broked, I have no clue what the deal is. It won't launch with the new build, and it won't launch with GE's builds or your old one I made unless I delete the prefix and create a new one with the GE build or your old one (I think I messed up the config on the new one). But either way, at least you know about the patch now.

@Tk-Glitch
Copy link
Member

@gardotd426
Copy link
Contributor Author

Ahh, I didn't the first hunk in the class.c file, so I figured that much hadn't been upstreamed, but I also didn't see that you'd added that part to the mk11.patch in wine-tkg-patches, and I thought you might remove the gamepad patch if it's no longer needed, but then again, I guess if someone's using _localbuild or a custom repo targeting an older version of Wine then they still might need it. I'll close, thanks.

@Tk-Glitch
Copy link
Member

Tk-Glitch commented Aug 27, 2020

It's still there as legacy patches for earlier trees. Like virtually all the patches I offer 🐸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants