mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 13:57:05 +02:00
Music screen: large playlists no longer empty it, and two logs say why things fail Music screen - The screen's list was turned down whole, and came up empty (the game's own Featured row too), once it held more than 1,024 songs: a few large YouTube Music, Spotify or local playlists went over that. The most is now 2,000 songs and 16,384 places in playlists (music_ui_most_songs, music_ui_most_places); 2,000 because the screen's own table of songs is read only up to 2,048. - The rows of the player's playlists are counted as they are registered and held under that: with no room left, the rest of a playlist is left out of its list (it still plays) and the screen is never empty for it. - A row whose "artist - title" is longer than the screen takes is left out; one such row turned the whole list down as well. - Said in the log: how many songs were left unlisted, and, should the list still be turned down, what it held. Logs - Spotify device: librespot's own warnings and errors are written at the warning level again; only the rest of what it says stays at debug. A player whose Spotify connects and stays silent had nothing to send. - Multiplayer: a message turned down with "Join code, sender identity, or multiplayer protocol did not match" now says which of the three it was, its size and first bytes, and whether it came from a dedicated server.
27 lines
1.6 KiB
C++
27 lines
1.6 KiB
C++
#pragma once
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
// Songs of our own in the game's registry of music, for the rows of the Spotify playlists in
|
|
// the music screen (spotify_station.h). A row there is a registered song, shown by the artist
|
|
// and title of its asset: these are copies of a registered song's asset with an artist and
|
|
// title of their own, registered by the game's own routine. They are in no playlist of the
|
|
// game's, so the game never chooses one to play. (Being tried.)
|
|
namespace dingosdk::spotify_rows {
|
|
// A song of this artist and title, registered with the game's music manager when it is not
|
|
// yet: its id in the music screen ("artist - title"), or empty when it could not be made.
|
|
// The thread that reads the catalog; not with the manager's lock held.
|
|
std::string ensure(std::uintptr_t base, std::uintptr_t manager, const std::string& artist, const std::string& title);
|
|
// Whether a row of that artist and title has been registered already (it then costs the music
|
|
// screen nothing more to use it again).
|
|
bool known(const std::string& artist, const std::string& title);
|
|
// The id ("artist - title") of the row known to the game by these 16 bytes, or empty.
|
|
std::string id_of(const unsigned char* row);
|
|
// Watches for the game beginning to play one of these (the player picked its row), which
|
|
// spotify_station is told of. Once.
|
|
bool install(std::uintptr_t base) noexcept;
|
|
// Adds a song (the 16 bytes the game knows it by) to a playlist of the game's, by the
|
|
// playlist's number, with the game's own routine. Any thread.
|
|
bool add_member(std::uintptr_t base, std::uintptr_t manager, std::uint32_t playlist, const unsigned char* song) noexcept;
|
|
}
|