forked from pyrite-dev/milsko
fix
This commit is contained in:
parent
c0e36df063
commit
d6538d4410
3 changed files with 11 additions and 11 deletions
|
|
@ -111,11 +111,11 @@ enum MwVULKANFIELD {
|
|||
|
||||
/*!
|
||||
* @brief Function for getting a field from within Vulkan.
|
||||
* @warning Consult the documentation for MwVULKANFIELD to know what type is expected for out.
|
||||
* @note Consult the documentation for MwVULKANFIELD to know what type is expected for output.
|
||||
*/
|
||||
MwInline void* MwVulkanGetField(MwWidget handle, int field, int* out) {
|
||||
MwInline void* MwVulkanGetField(MwWidget handle, int field, int* err) {
|
||||
void* field_out;
|
||||
MwVaWidgetExecute(handle, "mwVulkanGetField", &field_out, field, out);
|
||||
MwVaWidgetExecute(handle, "mwVulkanGetField", &field_out, field, err);
|
||||
return field_out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -822,7 +822,7 @@
|
|||
</return>
|
||||
<arguments>
|
||||
<integer enumname="MwVulkanField" name="field" />
|
||||
<integer pointer="yes" name="out" />
|
||||
<integer pointer="yes" name="output" />
|
||||
</arguments>
|
||||
</function>
|
||||
</functions>
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ int MwVulkanSupported(void) {
|
|||
}
|
||||
};
|
||||
|
||||
static void* mwVulkanGetFieldImpl(MwWidget handle, int field, int* out) {
|
||||
static void* mwVulkanGetFieldImpl(MwWidget handle, int field, int* err) {
|
||||
vulkan_t* o = handle->internal;
|
||||
char buf[1024];
|
||||
|
||||
|
|
@ -544,21 +544,21 @@ static void* mwVulkanGetFieldImpl(MwWidget handle, int field, int* out) {
|
|||
default:
|
||||
MwStringPrintIntoBuffer(buf, 1024, "Unknown vulkan field request (%d given)", field);
|
||||
MwDispatchError(1, buf);
|
||||
if(out != NULL) {
|
||||
*out = 1;
|
||||
if(err != NULL) {
|
||||
*err = 1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
if(out != NULL) {
|
||||
*out = 0;
|
||||
if(err != NULL) {
|
||||
*err = 0;
|
||||
}
|
||||
};
|
||||
|
||||
static void func_handler(MwWidget handle, const char* name, void* out, va_list va) {
|
||||
static void func_handler(MwWidget handle, const char* name, void* output, va_list va) {
|
||||
if(strcmp(name, "mwVulkanGetField") == 0) {
|
||||
int field = va_arg(va, int);
|
||||
int* err = va_arg(va, int*);
|
||||
*(void**)out = mwVulkanGetFieldImpl(handle, field, err);
|
||||
*(void**)output = mwVulkanGetFieldImpl(handle, field, err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue