Commit graph

21123 commits

Author SHA1 Message Date
Michael Maltese
2267ddeb17 DSPAssembler: fix handling of P_REG1C
`P_REG1C` had the same value as `P_ACCL`, so was causing spurious errors
when used with ACCM registers. Gcdsptool (which calls this `P_ACCLM`)
gives it the value `P_REG | 0x1c10` instead, and handles errors in the
same block as other REG## enums.
2017-06-03 15:16:39 -07:00
Leo Lam
4b53093acb Merge pull request #5520 from sepalani/write-console
HLE: Fix __write_console implementation
2017-06-03 22:00:23 +02:00
Leo Lam
227bc3816f Merge pull request #5517 from leoetlino/more-reliable-shutdown
More reliable shutdown
2017-06-03 21:33:43 +02:00
Leo Lam
bcc85f9f4d Merge pull request #5516 from leoetlino/drop-last-filename
Drop m_LastFilename
2017-06-03 21:32:04 +02:00
Leo Lam
fbad958f03 Merge pull request #5518 from JosJuice/replace-weird-brace-thingy
Replace {{}} with {}
2017-06-03 21:16:36 +02:00
Sepalani
2afa546551 HLE: Fix __write_console implementation 2017-06-03 20:06:31 +01:00
Léo Lam
546181c457 WX: Clear m_is_game_loading at the proper moment
This should happen after the core has stopped (OnStopped), not when
the user wants to stop (DoStop).
2017-06-03 19:05:35 +02:00
Léo Lam
52f00603e2 Core: Use RAII for EmuThread shutdown
This is more reliable, as this guarantees subsystems will be
shut down in the same order they were initialised (if they were
initialised). It also allows us to stop keeping track of what needs to
be shut down manually and just return in case of errors.

This should prevent the emulator from getting totally stuck when
the boot process does fail.
2017-06-03 19:05:35 +02:00
Leo Lam
5d6074f157 Merge pull request #5366 from sepalani/set-sym-size
CodeView: Set Symbol Size/End Address added
2017-06-03 19:00:45 +02:00
Leo Lam
6d38f153d6 Merge pull request #5515 from leoetlino/import-ticket
IOS/ES: Move ImportTicket write function
2017-06-03 18:40:52 +02:00
JosJuice
1c926dcae2 Replace {{}} with {}
IIRC we were only using {{}} because {} used to cause errors
on the FreeBSD buildbot.
2017-06-03 18:14:22 +02:00
Léo Lam
6e02af1b34 Core: Remove unneeded config save
We don't touch the user config during booting, so there is nothing to
manually save.
2017-06-03 18:08:50 +02:00
Léo Lam
677640ac52 Drop m_LastFilename
This makes it hard to support different boot params for different boot
types. We should not be making the assumption that Dolphin will
always be booting directly from a file (and in particular, only
using a string).

It's incompatible with future changes that will allow Dolphin to boot
a NAND title properly from well, the NAND, as opposed to booting from
WADs. (And no, treating the title TMD as a "bootable" path doesn't
count. Especially when that approach won't work with NAND images
or IOS LLE.)

And it's confusing to expose this functionality from the UI. It's
pretty bad for UX to change the play button's behaviour depending on
whether the user has launched something before, configured a default
file to boot, added a directory to their game paths.
2017-06-03 18:01:25 +02:00
Léo Lam
9d52ab5144 IOS/ES: Move ImportTicket write function
This commit moves the write function to where it should be (IOS),
especially when ES::ImportTicket() is the only place to use it.

Prevents misusing the ticket import function, and removes one unsafe
direct write to the NAND that does not go through IOS.

This also fixes the destination path: the session root is the one which
should be used for determining the ticket path, not the configured one.
2017-06-03 17:43:16 +02:00
JosJuice
1e5c83b3a9 Use std::optional for UpdateRunningGameMetadata 2017-06-03 14:41:09 +02:00
Leo Lam
4af514bb3c Merge pull request #5388 from leoetlino/optional
Add a std::optional and std::variant implementation
2017-06-03 13:21:20 +02:00
Leo Lam
ccccb8463d Merge pull request #5503 from ligfx/qtelidedbutton
DolphinQt2: add ElidedButton for controller mapping buttons
2017-06-03 12:47:18 +02:00
Leo Lam
1a983bd357 Merge pull request #5500 from ligfx/qtfixsorting
Qt: fixes to GameList sorting
2017-06-03 12:46:17 +02:00
Léo Lam
e38a66fe1b Common: Add a std::variant implementation
Based on https://github.com/mpark/variant (which is based on libc++).
2017-06-03 12:36:24 +02:00
Léo Lam
62d08e2d17 DiscIO: Fix the wrong NAND root being used
The whole NANDContentLoader stuff is truly awful and will be removed
as soon as possible.

For now, this fixes a bug that was exposed by std::optional::operator*.
2017-06-03 12:36:24 +02:00
Léo Lam
545006f666 Use std::optional for ESFormats/SharedContentMap 2017-06-03 12:36:24 +02:00
Léo Lam
b08653d69d Common: Add a std::optional implementation
std::optional makes a few things a bit neater and less error prone.
However, we still cannot use C++17 (unfortunately), so this commit
adds an implementation of std::optional that we can use right now.

Based on https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/lib/gtl/optional.h
which seems to be fairly similar to C++17's <optional> and standards
compliant. It's one of the few implementations that handle propagating
type traits like copy constructibility, just like libc++/libstdc++.
2017-06-03 12:36:24 +02:00
shuffle2
3443454ba2 Merge pull request #5271 from JosJuice/allow-aslr
Allow (but don't force) ASLR
2017-06-02 21:53:02 -07:00
shuffle2
0b63fcc78f Merge pull request #5505 from spycrab/wx_stars
Wx: Implement new, themed stars
2017-06-02 18:44:48 -07:00
spycrab
1d8ba6f865 Wx: Implement new, themed stars 2017-06-02 22:38:56 +02:00
Leo Lam
93020f6c1b Merge pull request #5509 from ligfx/qtshutdowncontrollers
MainWindow: shutdown different input interfaces
2017-06-02 22:08:53 +02:00
Sepalani
5e4986d835 IP/Top: Properly fix GetAddrInfo 2017-06-01 17:05:12 +01:00
Sepalani
726d8de16c IP/Top: Fix GetAddrInfo written socket 2017-06-01 15:17:59 +01:00
Michael Maltese
040bddafa6 MainWindow: shutdown different input interfaces
`MainWindow` initializes a number of input interfaces but never shuts
them down. This was causing a crash-after-exit on macOS where the
ControllerInterface backend stores a `std::thread` object in a static
variable and only stops it when ControllerInterface::Shutdown is called.
2017-05-31 21:14:55 -07:00
Michael Maltese
87a74ca3ae MappingButton: remove unused includes 2017-05-31 01:17:33 -07:00
Michael Maltese
046c6f468f MappingButton: derive from ElidedButton 2017-05-31 01:17:33 -07:00
Michael Maltese
b378ffb4ec MappingButton: don't set text twice in constructor 2017-05-31 01:17:33 -07:00
Michael Maltese
07c90bed08 DolphinQt2: add QtUtils/ElidedButton 2017-05-31 01:17:33 -07:00
spycrab
118e90ec6e Qt: Use new, themed rating stars 2017-05-31 05:50:37 +02:00
Anthony
25f24d32ff Merge pull request #5463 from spycrab/qt_hidpi
Qt: Fix HiDPI icon scaling
2017-05-30 14:57:05 -07:00
spycrab
1737e81b16 Qt: Fix HiDPI icon scaling 2017-05-30 22:42:21 +02:00
iwubcode
1b685bcde9 Fix for loop in D3D Renderer ApplyState function 2017-05-29 23:32:32 -05:00
Michael Maltese
1a7210aa74 GameListModel: provide Qt::InitialSortOrderRole for sorting
Fixes regression where pixmap columns can't be sorted by default.
2017-05-29 17:32:40 -07:00
Michael Maltese
8bbc31e0a2 GameList: sort case-insensitively 2017-05-29 17:32:40 -07:00
Michael Maltese
051cbf1962 GameListModel: invert role-column choice tree 2017-05-29 17:32:40 -07:00
Leo Lam
1afb0a134d Merge pull request #5497 from sepalani/getaddrinfo
IP/Top: Use a constant for addrinfo size
2017-05-29 22:39:33 +02:00
Leo Lam
c76335eaf1 Merge pull request #5484 from BhaaLseN/permissive
Windows: Enable MSVC Standards Conformance (/permissive-)
2017-05-29 22:29:44 +02:00
Sepalani
e90404a4f6 IP/Top: Use a constant for addrinfo size 2017-05-29 21:00:22 +01:00
Leo Lam
5d7f4cb9c8 Merge pull request #5496 from spycrab/qt_fixtheme
Qt: Fix GetThemeDir()
2017-05-29 18:33:56 +02:00
spycrab
845cc68bba Qt: Fix HiDPI icon scaling 2017-05-29 13:52:01 +02:00
shuffle2
c8f9900d26 Merge pull request #5495 from Tilka/gamelist
WX: improve game list reload speed
2017-05-28 22:03:38 -07:00
Lioncash
d6b6b070bc D3D/Render: Get rid of undefined behavior in Create3DVisionTexture
pSysMem is of the type const void* -- because of this, it makes the
original delete[] call undefined behavior, as deleting a void pointer is
undefined behavior.

Also punning types into existence, like what was done for the stereo
image header is undefined behavior as well. The proper way to do this is
to either manually add all individual bytes manually, or memcpy the
struct into memory.

As we want to deallocate the memory before returning, and because
pSysMem is a const void*, we keep a unique_ptr to the data and just pass
pSysMem a raw pointer to the data.
2017-05-28 23:28:00 -04:00
Lioncash
278e406f0b D3D/Render: Use std::array where applicable 2017-05-28 23:28:00 -04:00
Lioncash
0c3958bbe5 D3D/Render: Join variable with declaration 2017-05-28 23:27:59 -04:00
Lioncash
3ee447e5f7 D3D/Render: Get rid of unnecessary casts 2017-05-28 23:27:59 -04:00