Skip to content
Snippets Groups Projects
  1. Oct 16, 2018
    • bunnei's avatar
      config: Rename use_accurate_framebuffers -> use_accurate_gpu_emulation. · ee7c2dbf
      bunnei authored
      - This will be used as a catch-all for slow-but-accurate GPU emulation paths.
      ee7c2dbf
    • Lioncash's avatar
      file_sys/registered_cache: Use unique_ptr and regular pointers instead of... · 39ae73b3
      Lioncash authored
      file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicable
      
      The data retrieved in these cases are ultimately chiefly owned by either
      the RegisteredCache instance itself, or the filesystem factories. Both
      these should live throughout the use of their contained data. If they
      don't, it should be considered an interface/design issue, and using
      shared_ptr instances here would mask that, as the data would always be
      prolonged after the main owner's lifetime ended.
      
      This makes the lifetime of the data explicit and makes it harder to
      accidentally create cyclic references. It also makes the interface
      slightly more flexible than the previous API, as a shared_ptr can be
      created from a unique_ptr, but not the other way around, so this allows
      for that use-case if it ever becomes necessary in some form.
      39ae73b3
  2. Oct 15, 2018
  3. Oct 13, 2018
  4. Oct 09, 2018
    • Lioncash's avatar
      patch_manager: Return a std::unique_ptr from ParseControlNCA() and... · 6636f3ff
      Lioncash authored
      patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
      
      Neither of these functions require the use of shared ownership of the
      returned pointer. This makes it more difficult to create reference
      cycles with, and makes the interface more generic, as std::shared_ptr
      instances can be created from a std::unique_ptr, but the vice-versa
      isn't possible. This also alters relevant functions to take NCA
      arguments by const reference rather than a const reference to a
      std::shared_ptr. These functions don't alter the ownership of the memory
      used by the NCA instance, so we can make the interface more generic by
      not assuming anything about the type of smart pointer the NCA is
      contained within and make it the caller's responsibility to ensure the
      supplied NCA is valid.
      6636f3ff
    • NeatNit's avatar
      implemented touch in Qt and SDL · 4f24343f
      NeatNit authored
      change TouchToPixelPos to return std::pair<int, int>
      
      static_cast (SDL)
      
      various minor style and code improvements
      
      style - PascalCase for function names
      
      made touch events private
      
      const pointer arg in touch events
      
      make TouchToPixelPos a const member function
      
      did I do this right?
      
      braces on barely-multiline if
      
      remove question comment (confirmed in Discord)
      
      fixed consts
      
      remove unused parameter from TouchEndEvent
      
      DRY - High-DPI scaled touch put in separate function
      
      also fixes a bug where if you start touching (with either mouse or touchscreen) and drag the mouse to the LEFT of the emulator window, the touch point jumps to the RIGHT side of the touchscreen; draggin to above the window would make it jump to the bottom.
      
      implicit conversion from QPoint to QPointF, apparently
      
      I have no idea what const even means but I'll put it here anyway
      
      remove unused or used-once variables
      
      make touch scaling functions const, and put their implementations together
      
      removed unused FingerID parameters
      
      QTouchEvent forward declaration; add comment to TouchBegin that was lost in an edit
      
      better DRY in SDL
      
      To do -> TODO(NeatNit)
      
      remove unused include
      4f24343f
  5. Oct 07, 2018
  6. Oct 06, 2018
  7. Oct 05, 2018
  8. Oct 04, 2018
    • Lioncash's avatar
      ui_settings: Place definition of the theme array within the cpp file · 30dfd891
      Lioncash authored
      Placing the array wholesale into the header places a copy of the whole
      array into every translation unit that uses the data, which is wasteful.
      Particularly given that this array is referenced from three different
      translation units.
      
      This also changes the array to contain pairs of const char*, rather than
      QString instances. This way, the string data is able to be fixed into
      the read-only segment of the program, as well as eliminate static
      constructors/heap allocation immediately on program start.
      30dfd891
    • Lioncash's avatar
      kernel/thread: Make all instance variables private · baed7e1f
      Lioncash authored
      Many of the member variables of the thread class aren't even used
      outside of the class itself, so there's no need to make those variables
      public. This change follows in the steps of the previous changes that
      made other kernel types' members private.
      
      The main motivation behind this is that the Thread class will likely
      change in the future as emulation becomes more accurate, and letting
      random bits of the emulator access data members of the Thread class
      directly makes it a pain to shuffle around and/or modify internals.
      Having all data members public like this also makes it difficult to
      reason about certain bits of behavior without first verifying what parts
      of the core actually use them.
      
      Everything being public also generally follows the tendency for changes
      to be introduced in completely different translation units that would
      otherwise be better introduced as an addition to the Thread class'
      public interface.
      baed7e1f
  9. Oct 03, 2018
  10. Oct 02, 2018
  11. Oct 01, 2018
  12. Sep 30, 2018
    • Lioncash's avatar
      kernel/process: Make data member variables private · cf9d6c6f
      Lioncash authored
      Makes the public interface consistent in terms of how accesses are done
      on a process object. It also makes it slightly nicer to reason about the
      logic of the process class, as we don't want to expose everything to
      external code.
      cf9d6c6f
  13. Sep 27, 2018
  14. Sep 26, 2018
  15. Sep 24, 2018
  16. Sep 22, 2018
Loading