GPU: Client fetch objects can now have names and descriptions.

This commit is contained in:
rogerman 2022-04-07 13:17:34 -07:00
parent 7c036c1d50
commit 2efb260b44
2 changed files with 22 additions and 0 deletions

View File

@ -5913,6 +5913,12 @@ GPUClientFetchObject::GPUClientFetchObject()
memset(&_fetchDisplayInfo[i], 0, sizeof(NDSDisplayInfo)); memset(&_fetchDisplayInfo[i], 0, sizeof(NDSDisplayInfo));
} }
memset(_name, 0, sizeof(_name));
strncpy(_name, "Generic Video", sizeof(_name) - 1);
memset(_description, 0, sizeof(_description));
strncpy(_description, "No description.", sizeof(_description) - 1);
_clientData = NULL; _clientData = NULL;
_lastFetchIndex = 0; _lastFetchIndex = 0;
} }
@ -5997,6 +6003,16 @@ void GPUClientFetchObject::SetFetchDisplayInfo(const NDSDisplayInfo &displayInfo
this->_fetchDisplayInfo[displayInfo.bufferIndex] = displayInfo; this->_fetchDisplayInfo[displayInfo.bufferIndex] = displayInfo;
} }
const char* GPUClientFetchObject::GetName() const
{
return this->_name;
}
const char* GPUClientFetchObject::GetDescription() const
{
return this->_description;
}
u8 GPUClientFetchObject::GetLastFetchIndex() const u8 GPUClientFetchObject::GetLastFetchIndex() const
{ {
return this->_lastFetchIndex; return this->_lastFetchIndex;

View File

@ -1991,6 +1991,9 @@ public:
class GPUClientFetchObject class GPUClientFetchObject
{ {
protected: protected:
char _name[256];
char _description[256];
NDSDisplayInfo _fetchDisplayInfo[MAX_FRAMEBUFFER_PAGES]; NDSDisplayInfo _fetchDisplayInfo[MAX_FRAMEBUFFER_PAGES];
volatile u8 _lastFetchIndex; volatile u8 _lastFetchIndex;
void *_clientData; void *_clientData;
@ -2006,6 +2009,9 @@ public:
virtual void SetFetchBuffers(const NDSDisplayInfo &currentDisplayInfo); virtual void SetFetchBuffers(const NDSDisplayInfo &currentDisplayInfo);
virtual void FetchFromBufferIndex(const u8 index); virtual void FetchFromBufferIndex(const u8 index);
const char* GetName() const;
const char* GetDescription() const;
u8 GetLastFetchIndex() const; u8 GetLastFetchIndex() const;
void SetLastFetchIndex(const u8 fetchIndex); void SetLastFetchIndex(const u8 fetchIndex);