Commit Graph

2478 Commits

Author SHA1 Message Date
Lioncash 35959bdaf9 IniFile: Replace string joining code with JoinString 2017-03-22 19:30:15 -04:00
Lioncash b92871111a IniFile: std::move a std::string in GetLines
Also gets rid of an unnecessary string copy.
2017-03-22 19:09:25 -04:00
Lioncash dbdf693c81 IniFile: Use character literals instead of string literals where applicable
Character overloads are generally better overall (range checks aren't
necessary, etc).
2017-03-22 19:03:17 -04:00
Lioncash d8998b6392 IniFile: Provide an rvalue reference overload for SetLines
Allows moving in vectors instead of performing an unnecessary copy.
2017-03-22 18:49:13 -04:00
Lioncash 46d74a7760 IniFile: Make Section's string constructor instances take strings by value
As the name is immediately stored into a class member, a move here is a
better choice.

This also moves the constructor implementations into the cpp file to
avoid an otherwise unnecessary inclusion in the header. This is also
likely a better choice as Section contains several non-trivial members,
so this would avoid potentially inlining a bunch of setup and teardown
code related to them as a side-benefit.
2017-03-22 18:47:19 -04:00
Lioncash 99adc73383 IniFile: Make Section constructor explicit 2017-03-22 18:07:23 -04:00
MerryMage da434e1a1c ConstantPool: Externalize memory allocation 2017-03-21 20:16:12 +00:00
MerryMage 615fcc621d CodeBlock: Add support for multiple children 2017-03-21 20:16:12 +00:00
Anthony d2690568f9 Merge pull request #5110 from MerryMage/const-pool
Jit64: Implement a constant pool
2017-03-20 13:29:57 -07:00
MerryMage ff441efc26 EmuCodeBlock: Use ConstantPool 2017-03-20 20:21:42 +00:00
aldelaro5 8bf27cf42f Fix memory breakpoint when checking the middle of the data
If the delimiters of a memory aren't exactly the same as an address, but their size includes the memory breakpoint delimiter, the break will not go through.  This makes it so that you can specify a search for a memory breakpoint with a data size and will check if the data fits with that size on all memory breakpoints so the breaks go through.
2017-03-18 22:48:57 -04:00
Markus Wick 7b19475911 Merge pull request #4548 from stenzek/gcc-sse
Support SSSE3 texture decoders and CRC32 hashing on non-native builds (gcc)
2017-03-13 14:28:01 +01:00
Matthew Parlane b1bd231421 Merge pull request #5020 from leoetlino/es-safer-import
IOS/ES: Implement ES_AddTitleCancel (and slightly safer import process)
2017-03-12 16:14:17 +13:00
Léo Lam 9c31d6f5c5 IOS/ES: Handle personalised tickets properly
IOS unpersonalises device-specific ("personalised") tickets prior to
storing them on the NAND.
2017-03-11 21:14:26 +01:00
Léo Lam e656258949 IOS/ES: Write import files to /import first
This is slightly safer than writing contents to /title directly.
We still cannot rename everything in one go atomically, but this allows
implementing AddTitleCancel very easily.

Also, this ensures that when a title import fails, no incomplete files
will be left in the title directory, which can mess up the system menu.
2017-03-10 22:44:26 +01:00
Michael Maltese 418a7723c8 GLExtensions: remove NV_depth_buffer_float from OpenGL 3.0
Regression introduced in e99cd57 / 4935: VideoBackends: Set the maximum
range when the depth range is oversized[1]. The NV_depth_buffer_float
extension is not part of OpenGL 3.0, and requiring it causes a hard
crash when it's not supported (e.g. macOS).

[1]: https://github.com/dolphin-emu/dolphin/pull/4935
2017-03-10 12:54:46 -08:00
Markus Wick e99cd57eb3 Merge pull request #4935 from Armada651/depth-range-fix
VideoBackends: Set the maximum range when the depth range is oversized.
2017-03-10 18:05:52 +01:00
Anthony dc42f7fb28 Merge pull request #4991 from leoetlino/config-loaders
New config loaders
2017-03-09 16:56:14 +00:00
Florent Castelli b69d3f13cb common: Don't include intrin.h in a namespace
Fixes compilation with VS2017
2017-03-08 06:55:06 +01:00
Ryan Houdek ead8be9d19 Move IniFile section chunk handling to IniFile::Section 2017-03-05 15:47:23 +01:00
Léo Lam b7a1c6f504 Logging: Add CORE type 2017-03-05 15:47:23 +01:00
Mat M 7fa14169e9 Merge pull request #5007 from lioncash/swap
Common: Move byte swapping utilities into their own header
2017-03-05 09:45:29 -05:00
Lioncash 0e5a367ca3 SysConf: const-correctness 2017-03-04 19:19:42 -05:00
Lioncash 1ebd2cd7c3 SysConf: Get rid of pointer casts 2017-03-04 19:06:22 -05:00
Lioncash 552c0d8404 Common: Move byte swapping utilities into their own header
This moves all the byte swapping utilities into a header named Swap.h.

A dedicated header is much more preferable here due to the size of the
code itself. In general usage throughout the codebase, CommonFuncs.h was
generally only included for these functions anyway. These being in their
own header avoids dumping the lesser used utilities into scope. As well
as providing a localized area for more utilities related to byte
swapping in the future (should they be needed). This also makes it nicer
to identify which files depend on the byte swapping utilities in
particular.

Since this is a completely new header, moving the code uncovered a few
indirect includes, as well as making some other inclusions unnecessary.
2017-03-03 17:18:18 -05:00
Lioncash ee61bd6f2e CMakeLists: Normalize whitespace
Normalizes tabs to spaces to follow our codebase's indentation style.
2017-03-01 14:53:23 -05:00
Anthony 63c5230d9b Merge pull request #4959 from lioncash/ini
IniFile: Handle s64/u64 values
2017-02-27 10:02:53 -08:00
Matthew Parlane d666363ac4 Merge pull request #4966 from RisingFog/remove_traversal_server_debug_mode
Turn Off Debug Mode for Traversal Server
2017-02-27 16:18:13 +13:00
Matthew Parlane 48aeb5bf4b Merge pull request #4896 from leoetlino/esformats
Use ESFormats for tickets, TMDs and views
2017-02-27 16:15:05 +13:00
Anthony 7bcff99d89 Merge pull request #4963 from leoetlino/sysconf
SysConf: Use vectors instead of raw pointers
2017-02-26 16:09:17 -08:00
Anthony 0dde642b7d Merge pull request #4917 from leoetlino/config
New configuration namespace
2017-02-26 15:54:25 -08:00
Anthony 722ff4c020 Merge pull request #4915 from leoetlino/ini-changes
Expose some ways to manage an INI file
2017-02-26 15:48:53 -08:00
Léo Lam 5104caf6a6 Move AES code to Common/Crypto 2017-02-26 19:46:30 +01:00
Chris Burgener 4669b50e0b Turn Off Debug Mode for Traversal Server 2017-02-25 23:41:12 -05:00
Léo Lam a1e16c47db SysConf: Use vectors instead of raw pointers 2017-02-26 00:39:50 +01:00
Lioncash beec40f178 IniFile: Handle s64/u64 values 2017-02-25 00:03:20 -05:00
Jules Blok 94522d4cf3 OGL: Add support for glDepthRangedNV to handle oversized depth ranges. 2017-02-24 14:54:16 +01:00
Léo Lam 88a21dd2b9 Fix things mentioned during code review
Ref: https://github.com/dolphin-emu/dolphin/pull/4917
2017-02-23 18:15:12 +01:00
Léo Lam abe6f8766a Config: Add a few helper functions for repetitive tasks
Getting and setting configuration from the base config layer are common
and repetitive tasks. This commit adds some simpler to use functions to
make the new system easier to work with.

Config::Get and Config::Set are intended to make switching from
SConfig a bit less painful. They always operate on the main system.

Example usage:

    // before
    auto base_layer = Config::GetLayer(Config::LayerType::Base);
    auto core = base_layer->GetOrCreateSection(Config::System::Main, "Core");
    u8 language;
    core->Get("Language", &language, 0);
    SetData("IPL.LNG", language);

    // now
    auto base_layer = Config::GetLayer(Config::LayerType::Base);
    auto core = base_layer->GetOrCreateSection(Config::System::Main, "Core");
    SetData("IPL.LNG", core->Get<u8>("Language", 0));

    // or simply
    SetData("IPL.LNG", Config::Get<u8>("Core", "Language", 0));
2017-02-23 18:15:12 +01:00
Léo Lam 7bd34ac0b5 Config: Trigger callbacks on layer save
And remove an extraneous callback trigger in Config::Load.
2017-02-23 18:15:12 +01:00
Léo Lam 9c3265f1ef Config: Keep track of deleted keys
This allows deleted keys to be deleted from INIs properly.
2017-02-23 18:15:12 +01:00
Léo Lam b51c6023ba Config: Only save settings if they have been changed 2017-02-23 18:15:12 +01:00
Ryan Houdek 8360e358ee New configuration namespace 2017-02-23 18:15:11 +01:00
Lioncash 2f2aab963d SymbolDB: Simplify GetSymbolsFromHash
Given a std::map can't have duplicate keys, iterating over the map
explicitly isn't necessary, and find() can just be used instead.

Also, instead of manually calling push_back() for every entry to
be added, the range constructor of std::vector can be used instead to add
the whole range all at once.
2017-02-18 06:30:20 -05:00
Ryan Houdek 85c3e677da Expose some ways to manage an INI file.
This is required for our later INI file loaders and savers
2017-02-16 09:34:25 +01:00
Ryan Houdek a2f5c3dbe0 Add some missing INI files to FileUtil 2017-02-16 09:33:50 +01:00
Phil Christensen 2ed61b0ee1 C++ conformance fixes (MSVC /permissive-)
We (the Microsoft C++ team) use the dolphin project as part of our "Real world code" tests.
I noticed a few issues in windows specific code when building dolphin with the MSVC compiler
in its conformance mode (/permissive-).  For more information on /permissive- see our blog
https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/.

These changes are to address 3 different types of issues:

1) Use of qualified names in member declarations

    struct A {
        void A::f() { } // error C4596: illegal qualified name in member declaration
                        // remove redundant 'A::' to fix
    };

2) Binding a non-const reference to a temporary

    struct S{};
  
    // If arg is in 'in' parameter, then it should be made const.
    void func(S& arg){}
  
    int main() {
      //error C2664: 'void func(S &)': cannot convert argument 1 from 'S' to 'S &'
      //note: A non-const reference may only be bound to an lvalue
      func( S() );
   
      //Work around this by creating a local, and using it to call the function
      S s;
      func( s );
    }

3) Add missing #include <intrin.h>

Because of the workaround you are using in the code you will need to include
this.  This is because of changes in the libraries and not /permissive-
2017-02-15 20:37:04 -08:00
degasus 6aa54a029e JitArm64: Optimize GPR register push/pop. 2017-02-11 00:59:12 +01:00
JosJuice 99492c22a6 Merge pull request #4839 from leoetlino/better-warnings
Be less annoying when usbdk is not installed
2017-02-08 14:00:12 +01:00
Matthew Parlane f838d16b0c Merge pull request #4546 from RisingFog/tas_wii_nand
Copy Wii save for current game for Netplay and TAS
2017-02-08 18:58:28 +13:00