(This issue is a copy of the pre-existing GameSDK issue located here, made following the migration to a new issue tracker repo)
Description
Attempting to call IDiscordImageManager::fetch will always return an DiscordResult_InternalError via callback. We then can't run get_dimensions or get_data, as these return DiscordResult_NotFetched.
Steps to Reproduce
Minimal reproduction project:
#include "discord_game_sdk.h"
#include <stdio.h>
#include <stdlib.h>
void fetch_callback(void *p_callback_data, enum EDiscordResult p_result, struct DiscordImageHandle p_handle)
{
printf("Result: %i\n", p_result);
}
int main(void)
{
struct IDiscordCore *core;
struct DiscordCreateParams params;
DiscordCreateParamsSetDefault(¶ms);
params.client_id = APPLICATION_ID;
params.flags = DiscordCreateFlags_Default;
enum EDiscordResult result = DiscordCreate(DISCORD_VERSION, ¶ms, &core);
printf("Initialised Discord core with result %i\n", result);
if (!result)
{
struct IDiscordImageManager *images = core->get_image_manager(core);
struct DiscordImageHandle handle = {
.type = DiscordImageType_User,
.id = 425340416531890178, // For the purpose of this test, this is my user ID.
.size = 16, // Size could be any power of 2 from 16 to 256.
};
images->fetch(images, handle, false, NULL, fetch_callback);
while (!result)
{
result = core->run_callbacks(core);
}
printf("Callbacks failed: %i", result);
core->destroy(core);
}
printf("Exiting...\n");
return result;
}
(This issue is a copy of the pre-existing GameSDK issue located here, made following the migration to a new issue tracker repo)
Description
Attempting to call
IDiscordImageManager::fetch
will always return anDiscordResult_InternalError
via callback. We then can't runget_dimensions
orget_data
, as these returnDiscordResult_NotFetched
.Steps to Reproduce
Minimal reproduction project:
Expected Behavior
fetch
to returnDiscordResult_Ok
via callback:Current Behavior
Screenshots/Videos
N/A
Client and System Information