Commit Graph

23831 Commits

Author SHA1 Message Date
Lioncash c61d0dfe87 Frame: Make cheat dialog private
Rather than destroy and reinitialize the dialog whenever it's closed,
and opened this dialog can just be hidden from view when it's not
needed, and shown again when it is needed.

Also, a dialog should really not be managing any live instances of
itself, including the one directly in the main frame.

This gets rid of another usage of the main frame global.
2017-04-06 21:25:26 -04:00
Michael Maltese cef5bd4a09 TextureCacheBase: remove duplicated variable
Fixes warning:

```
Source/Core/VideoCommon/TextureCacheBase.cpp:869:17: warning: declaration shadows a local variable [-Wshadow]
      const u8* tlut = &texMem[tlutaddr];
                ^
Source/Core/VideoCommon/TextureCacheBase.cpp:784:13: note: previous declaration is here
  const u8* tlut = &texMem[tlutaddr];
            ^
```
2017-04-06 13:52:42 -07:00
Sepalani c170659189 StringUtil: Fix a ctype assertion 2017-04-06 15:02:21 +01:00
Stenzek f94cd57a70 Merge pull request #5213 from stenzek/c14x2-swap
TextureConversionShader: Add missing swap for index of C14X2 textures
2017-04-06 23:44:49 +10:00
Stenzek fdf2efdac6 TextureConversionShader: Add missing swap for index of C14X2 textures 2017-04-06 23:29:40 +10:00
Léo Lam 60d47eaeff IOS/ES: Return IPC_EINVAL for unknown ioctlvs
Instead of allowing unknown ioctlvs and faking success for both unknown
and unimplemented ioctlvs, which can possibly result in nasty, hard to
debug bugs (if the emulated software behaves unexpectedly), we should
reject unknown ioctlvs and log known, but unimplemented ioctlvs.
2017-04-06 15:18:23 +02:00
Léo Lam 98dea421ba IOS/ES: Block ES_DIVerify from the IPC interface
Simple accuracy change.

DIVerify is an internal ioctlv in unpatched, up-to-date IOSes,
where calling it from the PPC just returns -1017.
2017-04-06 10:38:06 +02:00
Mat M 36ab5eafcf Merge pull request #5208 from stenzek/c14x2-error
TextureConversionShader: Fix compile error in C14X2 decoder
2017-04-06 00:25:40 -04:00
Stenzek c6075f4c36 TextureConversionShader: Fix compile error in C14X2 decoder 2017-04-06 13:59:06 +10:00
Michael Maltese d10d09ccc1 VideoCommon: rework anamorphic widescreen heuristic
Some widescreen hacks (see below) properly force anamorphic output, but
don't make the last projection in a frame 16:9, so Dolphin doesn't
display it correctly.

This changes the heuristic code to assume a frame is anamorphic based on
the total number of vertex flushes in 4:3 and 16:9 projections that
frame. It also adds a bit of "aspect ratio inertia" by making it harder
to switch aspect ratios, which takes care of aspect ratio flickering
that some games / widescreen hacks would be susceptible with the new
logic.

I've tested this on SSX Tricky's native anamorphic support, Tom Clancy's
Splinter Cell (it stayed in 4:3 the whole time), and on the following
widescreen hacks for which the heuristic doesn't currently work:

Paper Mario: The Thousand-Year Door (Gecko widescreen code from Nintendont)
C202F310 00000003
3DC08042 3DE03FD8
91EEF6D8 4E800020
60000000 00000000
04199598 4E800020
C200F500 00000004
3DE08082 3DC0402B
61CE12A2 91CFA1BC
60000000 387D015C
60000000 00000000
C200F508 00000004
3DE08082 3DC04063
61CEE8D3 91CFA1BC
60000000 7FC3F378
60000000 00000000

The Simpsons: Hit & Run (AR widescreen code from the wiki)
04004600 C002A604
04004604 C09F0014
04004608 FC002040
0400460C 4082000C
04004610 C002A608
04004614 EC630032
04004618 48220508
04041A5C 38600001
04224344 C002A60C
04224B1C 4BDDFAE4
044786B0 3FAAAAAB
04479F28 3FA33333
2017-04-05 17:23:16 -07:00
Léo Lam d8089a457f WX: Disable a few menu items when a Wii title is running
Unsafe and keeping them enabled would allow inaccurate behaviour that
can break games.
2017-04-05 20:54:48 +02:00
Léo Lam 47a09de019 Add unit tests for IOS/ESFormats
This adds unit tests for IOS/ESFormats, and in particular, for the
TMDReader. It is tested using invalid TMDs (to check IsValid()) and
two valid, properly signed TMDs.

Things which are now tested:

* Title type helper functions.
* TMDReader: Validity check.
* TMDReader: General information returned by the Get*() methods.
* TMDReader: Raw TMD and generated TMD view, compared against IOS.
* TMDReader: Game ID generation code (which is Dolphin specific).
* TMDReader: Content information: getting by ID/index, order, metadata.
2017-04-05 20:54:11 +02:00
Léo Lam c4d5076696 Common: Add missing set(LIBS ...) for mbedtls 2017-04-05 20:54:11 +02:00
MerryMage 19eb09b086 Jit_SystemRegisters: Make mfspr PIE-compliant 2017-04-05 10:22:48 +01:00
MerryMage 38917a151d CoreTiming: Pull globals into a single struct 2017-04-05 10:22:48 +01:00
Scott Mansell 4c0a392698 Merge pull request #4715 from iwubcode/efb_copy_corruption_at_higher_ir
Add configurable toggle to round vertices to nearest pixel
2017-04-05 19:41:52 +12:00
Stenzek 27e9e469d4 Merge pull request #5206 from ligfx/fixcustomtextures
TextureCacheBase: fix custom textures not being loaded
2017-04-05 16:49:54 +10:00
Matthew Parlane 9fc223302b Merge pull request #5207 from lioncash/fwd-decl
ControllerEmu: Replace includes with forward declarations
2017-04-05 12:49:36 +12:00
Lioncash 14c81764df ControllerEmu: Replace includes with forward declarations
Replaces includes with forward declarations where applicable, and moves
includes to where they're actually needed.
2017-04-04 20:38:30 -04:00
Michael Maltese e9e3226026 TextureCacheBase: fix custom textures not being loaded
Fixes bug #10183 [0] introduced by 3bd184a / PR #4467 [1].

TextureCacheBase was no longer calling `entry->Load` for custom textures
since the compute shader decoding logic was added. This adds it back in.
It also slightly restructures the decoding if-group to match the one
below, which I think makes the logic more obvious.

(recommend viewing with `git diff -b` to ignore the indentation changes)

[0]: https://bugs.dolphin-emu.org/issues/10183
[1]: https://github.com/dolphin-emu/dolphin/pull/4467
2017-04-04 14:34:46 -07:00
Anthony 9d0a78db20 Merge pull request #5205 from leoetlino/log
IOS/WFS: Fix logging message
2017-04-04 15:41:47 +00:00
Léo Lam cf0492468d IOS/WFS: Fix logging message 2017-04-04 17:37:08 +02:00
Anthony d8c476b015 Merge pull request #5204 from leoetlino/tmd-view-fixes
IOS/ES: Fix GetTMDView
2017-04-04 15:14:04 +00:00
iwubcode a9d08a31a6 Add configurable toggle that rounds vertices to the nearest pixel when
w=1.  This fixes some games at higher IRs.
2017-04-04 09:52:18 -05:00
Stenzek 8d31b4f827 Merge pull request #5203 from stenzek/useless-interface
D3D: Drop redundant interface TextureEncoder
2017-04-05 00:09:19 +10:00
Léo Lam 6f8c30c863 IOS/ES: Fix GetTMDView
We had missing checks *and* were checking for the out vector size
improperly.

Rewritten based on the actual behaviour in IOS.
2017-04-04 16:04:24 +02:00
Stenzek 97dc773a3e D3D: Drop redundant interface TextureEncoder 2017-04-04 22:57:23 +10:00
Anthony 90acceaf41 Merge pull request #5201 from lioncash/determinism
Core: Hide determinism global
2017-04-04 06:21:07 +00:00
Anthony 840e58c032 Merge pull request #5196 from lioncash/tasdlg
TASInputDlg: Minor changes
2017-04-03 20:27:37 +00:00
Lioncash 0c1d56c16f Core: Hide determinism global
This is only ever queried and not set outside of the Core.cpp, so this
should just be hidden internally and just have a function exposed that
allows querying it.
2017-04-03 14:56:12 -04:00
Lioncash ad1a899a7c Core: Make EmuThread internally linked 2017-04-03 13:27:35 -04:00
Lioncash ed2e9e9e41 Core: Remove unnecessary forward declaration 2017-04-03 13:26:15 -04:00
Markus Wick 9b1e2c2b1e Merge pull request #5118 from mahdihijazi/master
[Android] Load the game banner from the ROM and use it if no screenshot is available
2017-04-03 16:20:34 +02:00
Markus Wick 9d1ae76d0d Merge pull request #5200 from lioncash/frame
Frame: Remove callback function prototypes from header.
2017-04-03 13:35:35 +02:00
Lioncash b67968c3d8 Core: Remove unimplemented function prototype SetBlockStart 2017-04-03 06:34:49 -04:00
Lioncash c457ee4995 Frame: Remove callback function prototypes from header
Gets rid of more direct usages of the main_frame global, keeping the
callbacks internal to the frame itself.
2017-04-03 06:34:36 -04:00
Matthew Parlane 637bdc45b3 Merge pull request #5197 from leoetlino/ios-reset
IOS: Don't expose HLE::Reset()
2017-04-03 21:26:01 +12:00
Markus Wick 3bd184a255 Merge pull request #4467 from stenzek/gpu-texture-decoding
VideoBackends: GPU Texture Decoding
2017-04-03 10:46:13 +02:00
Lioncash f3ab0fc3f8 TASInputDlg: Use an enum for ID constants
These are all related constants (and it doesn't make sense to allow
taking the address of them).
2017-04-03 04:29:15 -04:00
Lioncash 9dd29895cd TASInputDlg: Replace includes with forward declarations 2017-04-03 04:29:15 -04:00
Lioncash 2a968f02d7 TASInputDlg: Make constructor explicit 2017-04-03 04:29:14 -04:00
Lioncash 28395c6302 TASInputDlg: Simplify event queueing calls
wxQueueEvent/wxPostEvent are useful when the event is being dispatched
to another separate window, but aren't really necessary when the event
will be handled by the same window it's dispatched from.

GetEventHandler() is unnecessary here for the same reason. It's an event
intended to be handled by the dialog itself.
2017-04-03 04:29:14 -04:00
Lioncash 598a92426f TASInputDlg: Get rid of unnecessary event casts
wxCommandEvent already stores the necessary data; the control object
itself doesn't need to be retrieved and casted.
2017-04-03 04:29:14 -04:00
Lioncash 2af5b64f32 TASInputDlg: Apply auto to UI control initializations where appropriate
As all UI controls are essentially constructed with new expressions, the
type is already visible on the right-hand side, so repeating the type
twice isn't necessary.
2017-04-03 04:29:11 -04:00
Lioncash b809db52d1 TASInputDlg: Use std::array where applicable 2017-04-03 04:28:11 -04:00
Matthew Parlane ee0e6fa09c Merge pull request #5198 from ligfx/fixmactextfields
FrameTools: unbind KEY_DOWN handler when game stops
2017-04-03 19:47:37 +12:00
Michael Maltese f1dfa7933c FrameTools: unbind KEY_DOWN handler when game stops
Fixes issue 10162: Cannot type window text fields in macOS builds[0]

[0]: https://bugs.dolphin-emu.org/issues/10162
2017-04-02 19:17:35 -07:00
Léo Lam 0dbad29bf4 IOS: Don't expose HLE::Reset()
This is an implementation detail that does not have to be exposed.

It was used in WII_IPC whenever the IPC gets reset, but that does not
make much sense to me: the only time when IOS loses state and the IPC
registers are set up again is when it's reloaded. And reloading IOS
already calls Reset() indirectly.

Also, an IPC reset from the PPC definitely should not close all opened
devices!

This also gets rid of a special case for clear_devices, which is now
completely unneeded.
2017-04-02 18:00:32 +02:00
Markus Wick fd7f7c5541 Merge pull request #5159 from ligfx/arm64warnings
Arm64: a slew of warning fixes
2017-04-02 17:07:17 +02:00
Markus Wick 40cfa708a8 Merge pull request #5180 from lioncash/enum
CPU: Convert state enum to an enum class
2017-04-02 17:01:25 +02:00