Razviar / mtgap

Support tool for MTG Arena online game
https://mtgarena.pro/
224 stars 50 forks source link

Unable to get Overlay working #55

Closed Jameshobbs21 closed 4 years ago

Jameshobbs21 commented 4 years ago

Describe the bug After the new update, I have been unable to enable the overlay feature. In the previous implementation, it worked very well.

To Reproduce

  1. Launch MTGArena.Pro
  2. Verify "Game is not running!"
  3. Launch game
  4. MTGArena.Pro shows parsing logs
  5. Can't see overlay (attempted enable/disable overlay and tried using hotkeys (alt+O))

Expected behavior Overlay.

Desktop (please complete the following information):

Additional context I have three monitors on my system (but have tested with them disabled via WIN+P and PC Screen Only). Also had Ultramon running, which manages desktops, but tried to get overlay working after shutting those down.

Razviar commented 4 years ago

I think I know what's wrong, fix will be available in the next release. Also, can you check tracker installation folder for logs? They should have .log extension. It's in AppData/roaming/mtgaprotracker

Jameshobbs21 commented 4 years ago

I wasn't able to find any .log files in roaming, but did find a SquirrelSetup.log in local.

SquirrelSetup.log

stijndp commented 4 years ago

If you're running windowed, press ALT+enter and see if it shows up then. The overlay doesn't always want to cooperate working in windowed mode also disabling places in the game UI being unable to be clicked like + to build a new deck or clicking out of the play or options menu.

I run windowed with screen dimension written in the register because you can't set custom resolution in game and the MTGA developers are stuck in 1995 thinking you're still supposed to put settings in the register instead of a config file.

Jameshobbs21 commented 4 years ago

I've been running in full screen mode, sadly no luck swapping between windowed and full screen.

Good thinking though.

Toybear1986 commented 4 years ago

@Razviar только хотел зарепортить ошибки в оверлее, а он перестал работать совсем в версии 2.0.23. Причем сначала работал одну партию, а потом исчез.

Razviar commented 4 years ago

@Toybear1986 перезагрузка всего (ПК, игры, трекера) вроде как помогает.

goldmojo commented 4 years ago

I encounter the same issue in version 2.0.25.

1/ When overlay appears, it is blurred and not readable (see attached screenshot). blurred

2/ When using multi screen (2 screens), it is impossible to move overlay to the second screen.

I can provide additional logs or context if needed.

Razviar commented 4 years ago

@goldmojo Looks like your system is incompatible with Electron transparent window. Have you installed previous Tracker versions (like 2.0.23 etc)? Was it wokring before.

Also, currently moving overlay to second monitor is not supported in current implementation.

goldmojo commented 4 years ago

@Razviar It didn't work with any previous release (but worked with the old framework).

I use AMD Radeon Adrenalin 19.4.3 as display drivers (Hardware = R7 370).

stijndp commented 4 years ago

And now with v2.0.25 I can't get overlay anymore... Yesterday I could still get it to work by going fullscreen and forcing it but that button is gone now.

Razviar commented 4 years ago

This is actually issue of Electron transparent windows, not much we can do about it.

Razviar commented 4 years ago

We have a solution: in the next release there should be detached overlay window mode, so you will be able to try if it works. ETA is by the end of this week.

goldmojo commented 4 years ago

I must be unlucky, but I can't manage to make overlay work using 2.0.27 :-(

1/ Same issue when inside the main screen. 2/ Same issue when on the second screen.

I will manage to play without the overlay, thank you for the effort and happy Christmas !

Razviar commented 4 years ago

Probably it's some kind of general incompatibility with Electron transparency. Not much we can do about it.

Jameshobbs21 commented 4 years ago

quick update on my end. Still no overlay, but did sere the log for mtga: 2019-12-29_log.log

It appears to be looking for MTG arena in C: .

The directories that it is looking for is located in H:\MTGArenaLive\MTGA_Data

Perhaps this is related to my issues with seeing any overlay,

Edit: So I've been fiddling trying to reproduce the log messages, but have struggled to get more logging to pop in there... Not sure what is triggering the log from spitting out. I decided to create a 'junction' symbolic link from "C:/Program Files (x86)/Wizards of the Coast/MTGA" to my H:. After wiping all the settings and clearing out AppData for MTGAproTracker, I didn't get the same errors, but still no overlay. I did get this output from the log while MTGA was not running after synching my account with MTGAena.pro: 2019-12-30_log.log

Razviar commented 4 years ago

Do you have all data from tracker updating properly on site?

Jameshobbs21 commented 4 years ago

No issues updating the site.

Hoping to find some time tomorrow to compile things locally and debug.

Razviar commented 4 years ago

@Jameshobbs21 I wish each user was able to compile, debug locally and commit fix :D

Jameshobbs21 commented 4 years ago

Got everything compiled and running, and managed to see that it was trying to draw the window after placing some debug statements around.

What I've learned so far: 1) In full screen mode, the window flickers on-off in short bursts. Sometimes I have to fiddle with the toggles in the overlay settings to get this to start happening. 2) In windowed mode, I managed to get everything to work!

So at this time things are working great in Windowed mode.

Trying to figure out what is going on with full screen. I have 3 monitors and one of them is gsync. I'll play around with my setup and see if I can pinpoint what is causing the flickering.

Razviar commented 4 years ago

I can point on process_watcher.ts function for you to investigate, it's where all overlay positioning happens. In fullscreen mode it tries to get binding rectangle not from the game, but from screen itself

Jameshobbs21 commented 4 years ago

Did a reformat on my machine, and now all is working well in full screen :) So happy to say that all is good now!

Razviar commented 4 years ago

Can you please let me know what you did? Maybe it will help other users?

Jameshobbs21 commented 4 years ago

I'm guessing some of the software on my machine was conflicting with electron's window. I tried disabling them, but no luck.

So reformat... 1) Create Windows installation media on USB drive: https://support.microsoft.com/en-us/help/15088/windows-10-create-installation-media 2) Ensure you have product key if you have a physical copy of windows, if digital make sure you check login to Windows so you can properly activate windows 3) Reboot, and boot off of USB 4) Reinstall windows (this clears all data off of disk) 5) Boot into Windows, install drivers, software, etc.

Sadly I was unable to find a solution with my running version of Windows. I've been meaning to reformat for about a year now, so it was long overdue on my machine.

Razviar commented 4 years ago

Oh, THAT reformat. Lol. I thought you've reformatted code somehow :D good to know you got it working. Have to say, there's some users with similar conflicts, and they can't figure out what exactly causing this as well