mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-08-20 09:25:02 -05:00
Initial commit. Needs debugging.
This commit is contained in:
@@ -10,16 +10,16 @@ namespace data
|
||||
DataCommon() = default;
|
||||
|
||||
/// @brief Function to load the icon to a texture.
|
||||
virtual void load_icon() = 0;
|
||||
virtual void load_icon(sdl2::Renderer &renderer) = 0;
|
||||
|
||||
/// @brief Returns the icon.
|
||||
sdl::SharedTexture get_icon() { return m_icon; };
|
||||
sdl2::SharedTexture &get_icon() { return m_icon; };
|
||||
|
||||
/// @brief Sets the icon.
|
||||
void set_icon(sdl::SharedTexture &icon) { m_icon = icon; };
|
||||
void set_icon(sdl2::SharedTexture &icon) { m_icon = icon; };
|
||||
|
||||
protected:
|
||||
/// @brief Shared texture of the icon.
|
||||
sdl::SharedTexture m_icon{};
|
||||
sdl2::SharedTexture m_icon{};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "data/DataCommon.hpp"
|
||||
#include "data/TitleInfo.hpp"
|
||||
#include "data/User.hpp"
|
||||
#include "sdl.hpp"
|
||||
#include "sys/Task.hpp"
|
||||
|
||||
#include <mutex>
|
||||
@@ -56,7 +57,7 @@ namespace data
|
||||
bool write_cache(sys::Task *task);
|
||||
|
||||
/// @brief Processes the icon queue.
|
||||
void process_icon_queue();
|
||||
void process_icon_queue(sdl2::Renderer &renderer);
|
||||
|
||||
private:
|
||||
/// @brief User vector.
|
||||
|
||||
@@ -83,16 +83,12 @@ namespace data
|
||||
/// @return True on success. False on failure.
|
||||
bool has_save_data_type(uint8_t saveType) const noexcept;
|
||||
|
||||
/// @brief Returns a pointer to the icon texture.
|
||||
/// @return Icon
|
||||
sdl::SharedTexture get_icon() const noexcept;
|
||||
|
||||
/// @brief Allows the path safe title to be set to a new path.
|
||||
/// @param newPathSafe Buffer containing the new safe path to use.
|
||||
void set_path_safe_title(const char *newPathSafe) noexcept;
|
||||
|
||||
/// @brief Loads the icon from the nacp.
|
||||
void load_icon() override;
|
||||
void load_icon(sdl2::Renderer &renderer) override;
|
||||
|
||||
private:
|
||||
/// @brief This defines how long the buffer is for the path safe version of the title.
|
||||
@@ -114,7 +110,7 @@ namespace data
|
||||
char m_pathSafeTitle[TitleInfo::SIZE_PATH_SAFE]{};
|
||||
|
||||
/// @brief Shared icon texture.
|
||||
sdl::SharedTexture m_icon{};
|
||||
sdl2::SharedTexture m_icon{};
|
||||
|
||||
/// @brief Private function to get/create the path safe title.
|
||||
void get_create_path_safe_title() noexcept;
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace data
|
||||
void load_user_data();
|
||||
|
||||
/// @brief Loads the icon from the system and converts it to a texture.
|
||||
void load_icon() override;
|
||||
void load_icon(sdl2::Renderer &renderer) override;
|
||||
|
||||
private:
|
||||
/// @brief Account's ID
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "data/TitleInfo.hpp"
|
||||
#include "data/User.hpp"
|
||||
#include "data/accountUID.hpp"
|
||||
#include "sdl.hpp"
|
||||
#include "sys/sys.hpp"
|
||||
|
||||
#include <unordered_map>
|
||||
@@ -13,7 +14,7 @@ namespace data
|
||||
/// @brief Launches the data loading/initialization state.
|
||||
/// @param clear Whether or not the cache should be cleared.
|
||||
/// @param onDestruction Function that is executed upon destruction of the data loading screen.
|
||||
void launch_initialization(bool clear, std::function<void()> onDestruction);
|
||||
void launch_initialization(bool clear, sdl2::Renderer &renderer, std::function<void()> onDestruction);
|
||||
|
||||
/// @brief Writes pointers to users to vectorOut
|
||||
/// @param userList List to push the pointers to.
|
||||
|
||||
Reference in New Issue
Block a user