Skip to content

Commit

Permalink
update for lib change
Browse files Browse the repository at this point in the history
  • Loading branch information
HookedBehemoth committed Apr 18, 2020
1 parent c7f818b commit 90ce395
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion overlay/source/symbol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AlphaSymbol {
constexpr AlphaSymbol(size_t width, size_t height, const u8 *data)
: m_width(width), m_height(height), m_data(data) {}

void draw(s32 x, s32 y, tsl::gfx::Renderer *renderer, tsl::gfx::Color color) const {
void draw(s32 x, s32 y, tsl::gfx::Renderer *renderer, tsl::Color color) const {
const u8 *ptr = this->m_data;
const s32 x_offset = x - (m_width / 2);
const s32 y_offset = y - (m_height / 2);
Expand Down
2 changes: 1 addition & 1 deletion sys-tune/source/impl/music_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace ams::tune::impl {
std::vector<std::string> g_shuffle_playlist;
std::string g_current = "";
u32 g_queue_position;
os::Mutex g_mutex;
os::Mutex g_mutex(false);

RepeatMode g_repeat = RepeatMode::All;
ShuffleMode g_shuffle = ShuffleMode::Off;
Expand Down
30 changes: 15 additions & 15 deletions sys-tune/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ int main(int argc, char *argv[]) {
GpioPadSession headphone_detect_session;
R_ABORT_UNLESS(gpioOpenSession(&headphone_detect_session, GpioPadName(0x15)));

os::Thread gpioThread;
os::Thread pscThread;
os::Thread audioThread;
R_ABORT_UNLESS(gpioThread.Initialize(tune::impl::GpioThreadFunc, &headphone_detect_session, 0x1000, 0x20));
R_ABORT_UNLESS(pscThread.Initialize(tune::impl::PscThreadFunc, &pm_module, 0x1000, 0x20));
R_ABORT_UNLESS(audioThread.Initialize(tune::impl::AudioThreadFunc, nullptr, 0x2000, 0x20));
::Thread gpioThread;
::Thread pscThread;
::Thread audioThread;
R_ABORT_UNLESS(threadCreate(&gpioThread, tune::impl::GpioThreadFunc, &headphone_detect_session, nullptr, 0x1000, 0x20, -2));
R_ABORT_UNLESS(threadCreate(&pscThread, tune::impl::PscThreadFunc, &pm_module, nullptr, 0x1000, 0x20, -2));
R_ABORT_UNLESS(threadCreate(&audioThread, tune::impl::AudioThreadFunc, nullptr, nullptr, 0x2000, 0x20, -2));

R_ABORT_UNLESS(gpioThread.Start());
R_ABORT_UNLESS(pscThread.Start());
R_ABORT_UNLESS(audioThread.Start());
R_ABORT_UNLESS(threadStart(&gpioThread));
R_ABORT_UNLESS(threadStart(&pscThread));
R_ABORT_UNLESS(threadStart(&audioThread));

/* Create services */
R_ABORT_UNLESS(g_server_manager.RegisterServer<tune::ControlService>(MusicServiceName, MusicMaxSessions));
Expand All @@ -115,13 +115,13 @@ int main(int argc, char *argv[]) {

tune::impl::Exit();

R_ABORT_UNLESS(gpioThread.Wait());
R_ABORT_UNLESS(pscThread.Wait());
R_ABORT_UNLESS(audioThread.Wait());
R_ABORT_UNLESS(threadWaitForExit(&gpioThread));
R_ABORT_UNLESS(threadWaitForExit(&pscThread));
R_ABORT_UNLESS(threadWaitForExit(&audioThread));

R_ABORT_UNLESS(gpioThread.Join());
R_ABORT_UNLESS(pscThread.Join());
R_ABORT_UNLESS(audioThread.Join());
R_ABORT_UNLESS(threadClose(&gpioThread));
R_ABORT_UNLESS(threadClose(&pscThread));
R_ABORT_UNLESS(threadClose(&audioThread));

/* Close gpio session. */
gpioPadClose(&headphone_detect_session);
Expand Down

0 comments on commit 90ce395

Please sign in to comment.