Commit graph

16321 commits

Author SHA1 Message Date
Michael Maltese
fdcf5aeb75 DolphinWX: Fix position of GameListCtrl tooltips on macOS 2017-01-11 16:59:15 -08:00
Matthew Parlane
04a86e1cee Merge pull request #4646 from leoetlino/minor-simplifications
IOS HLE: Minor simplifications
2017-01-12 12:32:05 +13:00
Matthew Parlane
ed6e346664 Merge pull request #4617 from lioncash/hotkey
HotkeyInputConfigDialog: Move UI creation into named functions
2017-01-12 11:02:10 +13:00
Matthew Parlane
c765087548 Merge pull request #4645 from lioncash/breakpoints
BreakPoints: Minor changes
2017-01-12 11:01:11 +13:00
Lioncash
b760479f77 BreakPoints: Use std::any_of where applicable 2017-01-11 16:37:31 -05:00
Léo Lam
13c374b118 IOS HLE: Replace some loops with range-based loops 2017-01-11 21:20:15 +01:00
Léo Lam
36c4dda4ed IOS HLE: Simplify Reset() and SetDefaultContentFile()
Reset():
We only need to close IOS devices which were opened, and we can do that
simply by iterating over s_fdmap and closing any opened device.
With this change, s_device_map can be cleared at once.

SetDefaultContentFile():
We can just use s_es_handles which is guaranteed to contain three valid
ES devices. Gets rid of a downcast.
2017-01-11 17:52:28 +01:00
Lioncash
e97953130d BreakPoints: Use character literals for finding single characters
The single character find overload is better suited over the one for
finding character sequences.
2017-01-11 10:08:14 -05:00
Lioncash
4e649c60c0 BreakPoints: Make getters const member functions
Just const-correctness stuff. The returned collection can't be modified,
so this makes sense.
2017-01-11 10:08:14 -05:00
Lioncash
0f8bcf412d BreakPoints: Rename variables
Drops Hungarian notation where applicable.Drops Hungarian notation where
applicable.
2017-01-11 10:08:11 -05:00
Lioncash
274ab8a262 BreakPoints: Make the memchecks class member private
There's no need to make this public.
2017-01-11 10:07:34 -05:00
Markus Wick
f82d6c6fe1 Merge pull request #4644 from leoetlino/no-return-value
IOS HLE: Make Device::Update() return void
2017-01-11 15:09:41 +01:00
Mat M
55b82e323c Merge pull request #4537 from JosJuice/blob-open-less-files
Open less files when detecting/opening blobs
2017-01-11 08:30:16 -05:00
Léo Lam
15567ef2bf IOS HLE: Remove useless overrides in bt_stub
Since the Open command won't ever return with the stub, there's no way
we will get a Close/IOCtl/IOCtlV for it, so we don't have to
implement it at all.
2017-01-11 14:06:01 +01:00
Léo Lam
f66aab6381 IOS HLE: Make Device::Update() return void
The return value is not used at all, so it's useless to keep it.
And the semantics of the return value were not even well defined.
2017-01-11 14:06:01 +01:00
Lioncash
93c5c0213f BreakPoints: Convert typedefs into using aliases 2017-01-11 07:59:43 -05:00
Lioncash
50ee01754e BreakPoints: Add initializers for TBreakPoint and TWatch
Ensures all members are consistently initialized.
2017-01-11 07:55:43 -05:00
Lioncash
588374349f BreakPoints: In-class initialize TMemCheck members
Same thing, less code.
2017-01-11 07:53:49 -05:00
JosJuice
b1873264d7 WbfsBlob: Don't wrap file_entry in std::unique_ptr
There doesn't seem to be any reason for doing it.
2017-01-11 13:39:46 +01:00
JosJuice
0363be4320 WbfsBlob: Remove m_total_files
std::vector already keeps track of this for us.
2017-01-11 13:39:38 +01:00
JosJuice
5c02795af0 WbfsBlob: Only open each file once
The first file used to be opened once by
CreateBlobReader and once inside WbfsFileReader.
2017-01-11 13:33:27 +01:00
JosJuice
8d54bbc528 Don't create new IOFiles when creating a blob
...except for WBFS, which is special because
it has the ability to open multiple files.
2017-01-11 13:23:23 +01:00
JosJuice
d1ea00ed88 Only open file once when detecting blob type 2017-01-11 13:23:19 +01:00
Markus Wick
d9a37d38b4 Merge pull request #4571 from degasus/DSPHLE
Attempt re-adding the missing AXWii DSP_SYNC
2017-01-10 22:23:35 +01:00
Markus Wick
52ec186f0a Merge pull request #4642 from stenzek/split-x64-texture-decoders
TextureDecoder: Seperate each format into its own function
2017-01-10 12:06:47 +01:00
Stenzek
2f223e24dc TextureDecoder: Seperate each format into its own function 2017-01-10 20:41:00 +10:00
Lioncash
ea8fc594a5 Common: Move BreakPoints into Core
BreakPoints utilizes the jit global variable, so this was making Core and
Common cyclical dependencies on one another.
2017-01-10 05:24:44 -05:00
Matthew Parlane
ab2542ea41 Merge pull request #4630 from PEmu1/refresh-game-list
Change "Refresh List" to "Refresh Game List" in Menu
2017-01-10 14:06:23 +13:00
Markus Wick
440a2f832c Merge pull request #4637 from lioncash/jitcache
JitCache: Get rid of reliance on the JIT global variable
2017-01-10 00:07:17 +01:00
Léo Lam
a68aea1ace IOS HLE: Replace is_hardware with a proper device type
is_hardware is an obscure name (what does hardware mean?) and it forces
us to assume that anything that !is_hardware is a FileIO device. This
assumption prevents properly restoring OH0 child devices (which will be
implemented in the USB PR), so this commit replaces the is_hardware
bool with a device type.
2017-01-09 12:27:45 +01:00
Lioncash
37d10064b8 JitCache: Get rid of reliance on the JIT global variable 2017-01-09 04:43:06 -05:00
Lioncash
f75aab1a85 CachedInterpreter: Separate the block cache from CachedInterpreter
An interpreter is not a block cache. It may utilize a block cache, it may
contain a block cache but it *is not* A block cache.
2017-01-09 04:43:05 -05:00
Lioncash
eddccb3891 CachedInterpreter: Move to its own directory 2017-01-09 04:43:05 -05:00
Lioncash
2b8ede8dc6 JitCache: Move implementation details into the cpp file 2017-01-09 04:43:04 -05:00
Lioncash
cf18aeb1eb JitCache: Move private class details below public details
Also organizes cpp file organization to match the function layout.
2017-01-09 04:42:59 -05:00
Lioncash
1dab2c8816 IOFile: Correct explicit operator bool semantics
The operator void* variant was m_good ? m_file : nullptr;
so this was leaving out the file handle check.
2017-01-08 22:52:44 -05:00
Matthew Parlane
0869c63048 Merge pull request #4634 from leoetlino/probably-pointless-ios-fixes
IOS HLE: Minor changes to match IOS behaviour
2017-01-09 13:49:32 +13:00
Lioncash
00baf193ac CodeBlock: Const correctness for IsInSpace 2017-01-08 18:40:09 -05:00
Léo Lam
c761ac4f08 IOS HLE: Set return value to EINVAL for unknown commands
This matches IOS behaviour and allows getting rid of command handlers
which merely set the return value to EINVAL.
2017-01-08 21:18:08 +01:00
Léo Lam
45b59f01b8 IOS HLE: Allow up to 3 ES handles
Confirmed by a hardware test and a quick diassembly of /dev/es.

I'm not aware of anything that opens several ES handles, but
technically, this fixes a small inaccuracy in IOS HLE.
2017-01-08 21:16:10 +01:00
Léo Lam
23162ac722 IOS HLE: STM: Check if there is already an event hook
For IOCTL_STM_EVENTHOOK, IOS checks if there is already an event hook
to prevent overriding an existing event hook message with a new one,
without first releasing it.
2017-01-08 21:16:10 +01:00
Matthew Parlane
5135445298 Merge pull request #4627 from leoetlino/naming-cleanup
IOS HLE: Naming cleanup
2017-01-09 09:08:50 +13:00
Chris Burgener
47b3a9c68e Add Silent Audio Dumping INI Option 2017-01-08 13:53:44 -05:00
PEmu1
b25ed121d1 Change "Refresh List" to "Refresh Game List" in Menu
Make refresh list option more clear as to what it does and more consistent with other usage in the UI.
2017-01-08 09:24:17 -08:00
flacs
c30216003e Merge pull request #4622 from degasus/videosw
VideoSW: Fix GL ES shader.
2017-01-08 17:03:57 +00:00
Lioncash
27350dbf1c Jit64Base: Use size_t to represent size in LogGeneratedX86 2017-01-07 21:57:19 -05:00
Lioncash
77756b44d5 Jit64Base: Const correctness for LogGeneratedX86 2017-01-07 21:53:06 -05:00
Matthew Parlane
7a4464c3e0 Merge pull request #4599 from stenzek/point-uvs
GeometryShaderGen: Use lower-left origin for point texture coordinates
2017-01-08 13:40:55 +13:00
Léo Lam
1f9269d0ea ConfigManager: Don't overwrite the SYSCONF country
Currently, the country is always overridden depending on the Wii
language setting. This makes it impossible to change the country
independently from the language, unlike on a Wii, since a language
will always be associated to an unique country (which is hardcoded
in Dolphin's codebase).

This behaviour was added in c881262 and changed in PR 4319 to happen
every time emulation is started. It doesn't seem to be needed anymore,
as a quick testing shows that a Japanese system menu is able to load
in Japanese even with the region set to France, or anything other than
Japan in fact. So what this commit changes is drop this code.

Fixes issue 9884.
2017-01-08 01:28:43 +01:00
Léo Lam
c28b148783 IOS HLE: Clean up naming and remove unused defines
Removes #defines which have been unused for years and cleans up
naming.

This also changes IPC_REP_ASYNC to simply IPC_REPLY because it turns
out it's actually not specific to async replies, but used for all
command replies.
2017-01-08 01:20:40 +01:00
Léo Lam
7dcb3c5d55 IOS HLE: Clean up return codes
- Use an enum instead of defines.

- Only use the FS_ prefix for return codes which are actually related
  to FS stuff, not for everything.

- Remove duplicated error codes and clean up the names.
2017-01-08 01:20:35 +01:00
Matthew Parlane
7a5fe4b7ed Merge pull request #4624 from leoetlino/jit-warning-fixes
Add the g_ prefix to the jit global
2017-01-08 13:19:16 +13:00
Matthew Parlane
c89aa79380 Merge pull request #4626 from lioncash/size
CodeBlock: Get rid of implicit sign-conversion in AllocCodeSpace
2017-01-08 13:14:02 +13:00
Lioncash
9d8e8652fb CodeBlock: Get rid of implicit sign-conversion in AllocCodeSpace
Size is internally stored as a size_t, so having an int parameter
would cause implicit sign-conversion from a signed value to an
unsigned value to occur.
2017-01-07 19:05:06 -05:00
Léo Lam
22fcb735ed IOS HLE: HID: Remove left-over align function
Also remove unneeded AlignUp usages.
2017-01-08 00:36:04 +01:00
Léo Lam
3c50c61606 IOS HLE: Remove copy and pasted Open()/Close()
This removes Open() and Close() functions from devices whenever they
did nothing more than the base class (setting m_Active, returning a
default reply).

Also, since IOS close commands practically always return FS_SUCCESS,
writing the return code is moved to HandleCommand() in WII_IPC_HLE,
which has two benefits: it's not duplicated all over the place
(so people will not forget it) and it gets rid of having to check
the force parameter, since HandleCommand() is always called for
real IOS commands, so command_address is guaranteed to be valid.
2017-01-07 23:31:04 +01:00
Léo Lam
27e6363214 IOS HLE: Remove unneeded GetDeviceID() writes
It looks like at some point Dolphin device IDs coincided with IOS file
descriptors, but this is not the case anymore, so keeping those
WriteReturnCode(GetDeviceID()) in every single IOS HLE device,
as if the device ID was used as IOS fd, is both unnecessary
and confusing.
2017-01-07 23:30:59 +01:00
Matthew Parlane
7847ca41e2 Merge pull request #4607 from leoetlino/execute
IOS HLE: Refactor ExecuteCommand
2017-01-08 11:20:49 +13:00
Léo Lam
8bef7259e3 Add the g_ prefix to the jit global
Jan 04 22:55:01 <leoetlino>   fwiw, it looks like there are new warnings in the RegCache code
Jan 04 22:55:04 <leoetlino>   Source/Core/Core/PowerPC/Jit64/FPURegCache.cpp:13:33: warning: declaration shadows a variable in the global namespace [-Wshadow]
Jan 04 22:56:19 <@Lioncash>   yeah, the jit global should have a g_ prefix.

This fixes shadowing warnings and adds the g_ prefix to a global.
2017-01-07 23:19:49 +01:00
degasus
f12460d1f4 VideoSW: Fix GL ES shader. 2017-01-07 12:32:15 +01:00
Matthew Parlane
82e003ebb6 Merge pull request #4620 from JosJuice/android-byteswap
Don't use generic byteswapping on Android
2017-01-07 14:01:33 +13:00
degasus
f6c7a258ed BlendState: Use masking as a fastpath for the logic op NO_OP. 2017-01-06 14:01:39 +01:00
degasus
23b0faeba5 OGL: Use VideoCommon blend state for framebuffer configuration. 2017-01-06 14:01:39 +01:00
degasus
3df828463d VideoCommon: Assembly blending state in a shared state object. 2017-01-06 14:01:36 +01:00
JosJuice
5e2b2f059f Don't use generic byteswapping on Android
This seems to work fine nowadays.
2017-01-06 13:56:53 +01:00
Markus Wick
c33c9532a7 Merge pull request #4594 from lioncash/regcache
DSPJitRegCache: Make single argument constructor explicit
2017-01-06 13:01:40 +01:00
Markus Wick
878058ce68 Merge pull request #4613 from lioncash/scrubber
DiscScrubber: Minor changes
2017-01-06 13:00:51 +01:00
Markus Wick
82d45435fd Merge pull request #4616 from lioncash/hle
HLE: Align table formatting
2017-01-06 12:57:16 +01:00
Markus Wick
c633eeb383 Merge pull request #4619 from PEmu1/configuration
Change "Configure" to "Configuration" in Menu
2017-01-06 12:54:17 +01:00
PEmu1
398d544ebf Change "Configure" to "Configuration" in Menu
Other settings options are nouns rather than verbs so this change makes the configuration option consistent with others. Also makes the menu option label the same as the windows title.
2017-01-05 14:33:24 -08:00
Lioncash
89da37b1c6 HotkeyInputConfigDialog: Move UI creation into named functions
The constructor shouldn't be used as a dumping ground for all UI-related
initialization. Doing so makes it somewhat more difficult to reason about
how certain UI elements get created. It also puts unrelated identifiers in
the same scope.

This separates the UI creation out so code relevant to each component
is self-contained.
2017-01-05 16:26:42 -05:00
Mat M
e7359f247b Merge pull request #4595 from aldelaro5/add-debugger-hotkeys
Add debugger hotkeys
2017-01-05 14:33:10 -05:00
Mat M
6fe621f203 Merge pull request #4589 from ligfx/cleaninputconfigdiag
InputConfigDiag: move function bodies out of header
2017-01-05 14:29:35 -05:00
Mat M
0de4ad334f Merge pull request #4605 from PEmu1/tas-gamecube-contro
Clarify GameCube Controller in TAS Input
2017-01-05 14:28:54 -05:00
Mat M
495580637f Merge pull request #4606 from BhaaLseN/clang-format-union
specify custom brace style to fix unions
2017-01-05 14:27:27 -05:00
Mat M
9da6982ac3 Merge pull request #4608 from RisingFog/input_display_newlines
Add missing new lines for OSD
2017-01-05 14:25:24 -05:00
Mat M
189e5f87fb Merge pull request #4612 from PEmu1/memcard-menu
Don't Use Abbreviation for "Memory Card"
2017-01-05 14:22:54 -05:00
Lioncash
a10bb15f17 HLE: Add explicit initializers for OSBreakPoints' stub entry
No behavior change, this just makes implicit values explicit.
2017-01-05 14:15:45 -05:00
Lioncash
2941468857 HLE: Align table formatting 2017-01-05 14:13:30 -05:00
PEmu1
6d195f3d65 Don't Use Abbreviation for "Memory Card" 2017-01-05 10:06:46 -08:00
BhaaL
23d99f2f2c specify custom brace style to fix unions
BreakBeforeBraces: Allman apparently includes all styles,
except for AfterUnion (which is false) when using clang-format -dump-config
2017-01-05 12:55:13 +01:00
JosJuice
41101be545 Merge pull request #4611 from lioncash/fileutil
IOFile: Minor changes
2017-01-05 09:17:03 +01:00
Lioncash
a93861ab49 DiscScrubber: Don't take SFileInfo instances by value
Avoids unnecessary copies.
2017-01-04 20:12:49 -05:00
Lioncash
c52d1e735a DiscScrubber: Use an unsigned loop index in ParseDisc
Prevents an implicit signed to unsigned conversion when assigning a
partition's group number.
2017-01-04 20:03:12 -05:00
Lioncash
6ff21c48cb DiscScrubber: Correct printf specifiers 2017-01-04 19:56:39 -05:00
Lioncash
b1a2dec78a DiscScrubber: Convert a #define into a typed constant 2017-01-04 19:53:31 -05:00
Léo Lam
a15be890e1 WII_IPC_HLE: Update the "IOS basics" comment
The codebase has changed since it was written, so it needed
a small update.
2017-01-05 01:11:52 +01:00
Léo Lam
00268443ca WII_IPC_HLE: Replace #defines with constexpr 2017-01-05 01:04:20 +01:00
Léo Lam
9abfa54c9d IOS HLE: Remove s_es_inuse
We don't really have to keep track of device opens/closes manually,
since we can already check that by calling IsOpened() on the device.

This also replaces some loops with for range loops.
2017-01-05 01:04:19 +01:00
Lioncash
045a8400e6 IOFile: Make the move constructor and move assignment operator noexcept
Certain parts of the standard library try to determine whether or not a
transfer operation should either be a copy or a move. The prevalent notion
of move constructors/assignment operators is that they should not throw,
they simply move an already existing resource somewhere else.

This is typically done with 'std::move_if_noexcept'. Like the name says,
if a type's move constructor is noexcept, then the functions retrieves an
r-value reference (for move semantics), or an l-value (for copy semantics)
if it is not noexcept.

As IOFile deletes the copy constructor and copy assignment operators,
using IOFile with certain parts of the standard library can fail in
unexcepted ways (especially when used with various container
implementations). This prevents that.
2017-01-04 18:37:48 -05:00
Lioncash
9b8f5bce22 IOFile: Change 'operator void*' into 'explicit operator bool'
'operator void*' is basically a pre-C++11-ism that was used, as C++03
only had the notion of implicit type-conversion operators, but not explicit type
conversion operators (allowing implicit conversion of a file handle to
bool can go downhill pretty quickly).
2017-01-04 18:10:21 -05:00
Lioncash
c541e1099e IOFile: Make class variables private
Internals shouldn't be directly exposed.
2017-01-04 17:48:46 -05:00
Lioncash
c21dad9e83 IOFile: Get rid of unnecessary unimplemented copy constructor/assignment operator.
IOFile already inherits NonCopyable.
2017-01-04 17:47:40 -05:00
Michael Maltese
443815df16 DolphinWX: pass wxMsgAlert to main thread on non-GTK too
Fixes an issue on macOS where wxMessageBox always returns wxCANCEL when
not called from main thread.
2017-01-04 14:06:31 -08:00
Lioncash
5b1aae0cbf DiscScrubber: Make struct and variable names conformant to the coding style 2017-01-04 17:04:41 -05:00
Lioncash
4a9bc2340b DiscScrubber: Convert into a class
Allows potential multiple scrubbers to run at once. Also gets rid of the
need to explicitly clean up resources.
2017-01-04 16:06:21 -05:00
degasus
41b0c74e30 VideoCommon: Make dst_alpha state implicit. 2017-01-04 20:02:31 +01:00
degasus
b7d8bd13a6 OGL/Vulkan: Drop dual pass alpha. 2017-01-04 19:59:41 +01:00
Léo Lam
b65ad538ba IOS HLE: Refactor ExecuteCommand
ExecuteCommand was becoming pretty confusing with unused variables
for some commands, confusing names (device ID != IOS file descriptor),
duplicated checks, not keeping the indentation level low, and having
tons of things into a single function.

This commit gives more correct names to variables, deduplicates the
device checking code, and splits ExecuteCommand so that it's
easier to read.

It's worth noting that some device checks have been forgotten in the
past, which has caused a bug (which was recently fixed in 288e75f6).
2017-01-04 19:33:50 +01:00
JosJuice
c5e731644c Don't use GetEmulatedTime in GCMemcard
GCMemcard is only used outside of the core and has
no real reason to use the core's RTC. GetEmulatedTime
isn't designed to be called when the core isn't running.
Should fix https://bugs.dolphin-emu.org/issues/9871
2017-01-04 19:17:51 +01:00