Somewhere I have images of work I've done on the Minolta "x" model cameras, but they would be stored on 3.5 inch floppy disks. I had once migrated them all to a hard disk but a lightning strike reduced that computer to a lump. There is a fellow in the UK who has posted some work he did on the capacitor problem here:
https://simonhawketts.co.uk/2016/05/04/minolta-xg-m-capacitor-replacement/ His work is good and you can see much of the possible nightmare awaiting you.
If your mirror view is ok, that is a good beginning sign. There is an electronic/shutter problem which pretty much disables everything and a half-view through the viewfinder is what you'll see. If your display is misaligned, one's first thought might be that somebody has been in there goofing around and got it out of whack. But honestly that isn't likely. Here is the bad news: there is a flex circuit which sits right on top of the pentaprism. That flex circuit (you can see it in Simon's images) must be removed in order to disassemble the prism assembly and it isn't easy if you're not really comfortable with de-soldering and re-soldering some tiny wires. In one or two of the x models you can remove the switch assembly on one side and fold it over. Let's both hope the XG-M is one of those. I can't recall, sorry. On each side of the pentaprism sit the display pieces (which naturally are wired in to the flex circuit). What you need to do is get to the prism, remove the prism holder, lift it carefully up a bit and move the side display (or both of them) back into place. Unfortunately getting to it and keeping the integrity of all the wiring is the challenge...