mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-06 23:51:17 +00:00
Made Discord asserts more descriptive
This commit is contained in:
parent
01faa86bf0
commit
4acbbb4db7
1 changed files with 47 additions and 1 deletions
|
@ -14,7 +14,53 @@
|
|||
#endif
|
||||
#include "../network.h"
|
||||
|
||||
#define DISCORD_REQUIRE(x) assert(x == DiscordResult_Ok)
|
||||
// disgusting but descriptive
|
||||
#define DISCORD_REQUIRE(x) { \
|
||||
enum EDiscordResult DISCORD_REQUIRE_RC = x; \
|
||||
if (DISCORD_REQUIRE_RC != DiscordResult_Ok) { \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_ServiceUnavailable); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidVersion); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_LockFailed); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InternalError); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidPayload); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidCommand); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidPermissions); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_NotFetched); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_NotFound); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_Conflict); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidSecret); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidJoinSecret); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_NoEligibleActivity); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidInvite); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_NotAuthenticated); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidAccessToken); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_ApplicationMismatch); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidDataUrl); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidBase64); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_NotFiltered); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_LobbyFull); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidFilename); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidFileSize); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidEntitlement); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_NotInstalled); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_NotRunning); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InsufficientBuffer); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_PurchaseCanceled); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidGuild); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidEvent); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidChannel); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidOrigin); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_RateLimited); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_OAuth2Error); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_SelectChannelTimeout); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_SelectVoiceForceRequired); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_CaptureShortcutAlreadyListening); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_UnauthorizedForAchievement); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_InvalidGiftCode); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_PurchaseError); \
|
||||
assert(DISCORD_REQUIRE_RC != DiscordResult_TransactionAborted); \
|
||||
} \
|
||||
}
|
||||
|
||||
extern struct NetworkSystem gNetworkSystemDiscord;
|
||||
extern bool gDiscordInitialized;
|
||||
|
|
Loading…
Reference in a new issue