[DISCUSSION] Patch WMC to run on Windows 10 final & possible alternatives

Discussion in 'Windows 10' started by ricktendo64, May 8, 2015.

  1. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    Sure, but to me was very clear that DVBlink, albeit usable with Kodi, android, vlc..., was used because WMC (no matter if officially or unofficially supported).

    They removed it and shoot their feet.

    It's like if McDonalds stopped to sell Hamburgers, because they sell salads and ice creams as well... It's not going to work, people get there because hamburgers...

    I promise you (and myself) that I'll try, when my mood is in the right "configuration":oops:

    Still I remember in 2006 or so what I had to do to run a simple Treo smartphone emulator.

    In the PalmOS flavor download a 13 megabytes zip, unpack it and launch the exe.

    In the windows mobile flavour I had to install the whole visual studio, a couple of SDKs, some plugins and whatnot, something like 6/7 GB of MS stuff... :D

    That's the mother of all questions, I have no firm answer right now...

    It's like Actual Multiple Monitor, the aim is different but the practical effect helps WMC :D
    P.S. speaking of AMM maybe your WMC mini-mods 1.3.0 makes AMM redundant to fix the WMC problems.

    Almost redundant... w/o AMM the mouse is still trapped in the monitor that runs WMC in full screen mode, is there anything you can do about that?
     
  2. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    143
    125
    10
    Hehe, maybe? So far, I'm seeing mixed results: it worked for me on an Intel NUC but didn't for someone else. Interestingly, it also helped someone who was seeing graphics issues on a recent AMD platform (until very recently, we thought only recent Intel platforms were affected).

    I just tried: with the fullscreen exclusive mode (the default mode used by WMC), the mouse is indeed trap, but when disabling the exclusive mode using WMC mini-mods, it's not: I tested with WMC on the main screen and on the secondary one.
     
  3. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    Well, for sure seem it fixes the black screen in FS mode, from RDP, which is one of the many reasons I use AMM, even in single monitor setups.

    Other problems seem to be related mostly to HDPI fixes introduced since 1703 or so, just guessing, but maybe different brand/generations introduced some workarounds, or supposed fixes in their drivers, and the mileage varies across brands and/or generations.

    Oh I missed that part.

    Indeed it works, thanks!

    But for my very personal habits, it has an unwanted effect:

    I'm a 16/10 monitor lover, and on 16/10 monitor, using WMC+AMM in fullscreen, keeps the taskbar visible leaving the rest of the screen as a almost perfect 16:9 area.

    Which I find very convenient when I work on a monitor keeping WMC on the other one.

    (This is a problem on 16:9 monitors/TVs. For that scenario I have an exclusive utility that can enable or disable the taskbar autohide when wmc is running.

    A friend did it for me given there isn't any known utility that can do that w/o restarting explorer.)

    Back to FS exclusive mode, if disabled WMC takes the FS, no matter if AMM is running or not

    That said is nice to have your mod given the feature can be enabled and disabled at will.
     
  4. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    143
    125
    10
    Well, AFAIK, what works around the black screen is not really the "non-exclusive fullscreen mode" mini-mod but the fact I reverted the patch introduced a while ago by Graznok (which now matches the default WMC behavior, that you also get with Gary's MSI-based installer). I replaced it by a conditional and opt-in DisableRemoteSessionSupport option that does pretty much the same thing.

    That said, while it "fixes" the black screen, you can't watch anything via RDP, so not sure it fits your needs :p

    It's very possible, High DPI has always been very complicated and WMC wasn't updated to benefit from the recent improvements introduced in Windows 10 1607+.
    That said, it would be interesting to see what <dpiAwareness>PerMonitorV2</dpiAwareness> does on WMC (likely something weird, but who knows?) :wavetowel2:

    Ah yeah, it's definitely an advanced scenario (too much for such a simple/trivial mini-mod :haha:)
     
  5. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    I haven't tested extensively across my installations, but seem the patch alone, no registry touched, is enough to fix the black screen over RDP in FS.

    Usually I had to have AMM running to have the same effect

    Well I don't have any HDPI monitor to try to get the whole picture, maybe is better to not wake the sleeping dog... :D

    Yea an advanced scenario discovered by chance...

    I think that even AMM coders have an idea of that "side effect", at least I never read anything on their website about WMC.

    Perhaps Display Fusion (which is a, maybe better known, competing program) that has (more or less) the same features, has no effect on WMC
     
  6. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    @Kévin Chalet

    Like Steve Jobs said....
    One more thing: given now you have WMC decompiled, something I really would like to see is to change some keyboard shortcuts.

    What drives me crazy is the spacebar mapped to "jump to the last channel" (ENTER does the same function anyway).

    Given everything else has the spacebar mapped to PAUSE/RESUME, is pretty natural to push the spacebar to resume a paused live TV show.

    And if you do that you loose all the timeshift buffer, when that happens my monitor(s) seriously risk to be punched :D

    Another thing I would like to see (with less priority) is to have WHEEL_UP/WHEEL_DOWN mapped to Instant replay/skip ahead (obviously not when the guide/miniguide is shown), it's so handy in MPC-HC and other players to quickly move across a video...
     
  7. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    143
    125
    10
    Yeah, but you're no longer able to watch TV via RDP (it's the default WMC behavior that was overridden in the 8.x branch)

    Haha, decompiling WMC's managed assemblies has never been the complicated part (it's just .NET MSIL after all, so it's very easy to decompile them to readable C# code) :whistling:
    What's complicated is finding what you want to change: WMC's codebase is absolutely massive and it's often like looking for a needle in a haystack :shutup3:

    I'll give it a try but no promise :whistle3:
     
  8. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    Likely I wasn't clear enough...

    I know that very well, Graznok patched that part upon my request, both for 8.1 and W7 based WMC

    But still, after the patch, WMC worked via RDP in window mode only, then I discovered "The Maxifier" that use a fake fullscreen (a borderless windows sized as the full screen), then I discovered that AMM fixed the problem in a better way (then was natural to use AMM to fix any similar problem, after 1703 even if unrelated with RDP).

    Now seem that your patch fixes the problem as well, no matter if the fullscreen exclusive mode is set to 0 or 1.

    I hope I was clearer this time. :oops:

    Yeah I remember that decompiling was easy, but AFAIR Graznok (and others) had a bit of more hard time in recompiling it (it's almost 9 years ago so my memory may fail)

    Oh.. I hoped there was a clear section dedicated to key bindings, and they weren't spread across all the code.

    Thanks anyway, dont waste much time on that if it implies a lot of work.;)
     
  9. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    #10790 acer-5100, Feb 2, 2024
    Last edited: Feb 2, 2024

    Yeah that's exactly what I'm saying (but still take it with a pinch of salt, as I tested it only on a 1809 install, and there is always the chance that something else I did in the past is "interfering")



    You are my hero ! :wub:
     
  10. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    143
    125
    10
    Hahaha, glad you like it :3eyes:

    To avoid confusing users, let's remove that link for now: each mini-mod is supposed to be opt-in and the .dll I shared doesn't have a registry key attached to change the space bar behavior. I'll release a proper 1.4.0 version later :evil2:
     
  11. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    OK, link removed (both from the web and the message)
    Yepp, a registry entry would be preferred, but it could be also a simple question in the installer script...

    (unless you mind to make all the keybindings customizable, which would be awesome, but also a lot of work, I presume)
     
  12. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    143
    125
    10
    #10797 Kévin Chalet, Feb 2, 2024
    Last edited: Feb 2, 2024
    Hahaha, yeah, I know it's a bit confusing, but it actually reflects how it's implemented. WMC has managed+native code that detects whether the session is remoted: in this case, it enforces a few things to make things play nicer via RDP (e.g visual animations and sound effects are disabled, you can't set up live TV and you're normally not able to play any video via RDP... tho' it seems to work in your case!).

    What the hook does is disabling the remote session support so that you get a "normal WMC session" via RDP, hence the name, DisableRemoteSessionSupport.
     
  13. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    BTW the registry setting works, as it's supposed to, once imported.
     
  14. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,919
    150
    @Kévin Chalet

    I forgot to mention that you should add something like this at the beginning of the installer, given having a running service does block some files replacement, ending with half the job done.

    Code:
    %windir%\system32\sc.exe query ehRecvr | find /i "RUNNING" 1>nul && net stop ehRecvr /y >nul 2>&1
    %windir%\system32\sc.exe query ehSched | find /i "RUNNING" 1>nul && net stop ehSched /y >nul 2>&1
    %windir%\system32\sc.exe query Mcx2Svc | find /i "RUNNING" 1>nul && net stop Mcx2Svc /y >nul 2>&1
    
    Or even use

    taskkill /F /IM

    Less elegant but effective even if some processes are hung (it happens, rarely, but it happens)
     
  15. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    143
    125
    10
    Yeah, definitely a good idea: I mentioned on TGB that these services must be stopped before executing the tool, but it wouldn't hurt to have a second line of defense (third-party tools like Remote Potato or Recording Broker and non-services processes like ehshell.exe/ehtray.exe/ehvid.exe should probably be added to that list).

    I'll do that in a future version. Thanks for the suggestion.