mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-23 20:38:07 +01:00
Some small cleanups.
This commit is contained in:
parent
2a659043d3
commit
514f2ddbd9
1 changed files with 5 additions and 2 deletions
|
@ -529,6 +529,8 @@ STEAM_METHOD_DESC(LoadItemDefinitions triggers the automatic load and refresh of
|
||||||
bool LoadItemDefinitions()
|
bool LoadItemDefinitions()
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("LoadItemDefinitions\n");
|
PRINT_DEBUG("LoadItemDefinitions\n");
|
||||||
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
|
|
||||||
if (!definition_update_called) {
|
if (!definition_update_called) {
|
||||||
call_definition_update = true;
|
call_definition_update = true;
|
||||||
}
|
}
|
||||||
|
@ -549,6 +551,7 @@ bool GetItemDefinitionIDs(
|
||||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize )
|
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("GetItemDefinitionIDs\n");
|
PRINT_DEBUG("GetItemDefinitionIDs\n");
|
||||||
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
if (!punItemDefIDsArraySize)
|
if (!punItemDefIDsArraySize)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -582,7 +585,8 @@ bool GetItemDefinitionIDs(
|
||||||
bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName,
|
bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName,
|
||||||
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut )
|
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("GetItemDefinitionProperty\n");
|
PRINT_DEBUG("GetItemDefinitionProperty %i %s\n", iDefinition, pchPropertyName);
|
||||||
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
|
|
||||||
item_iterator item;
|
item_iterator item;
|
||||||
if ((item = items.find(iDefinition)) != items.end())
|
if ((item = items.find(iDefinition)) != items.end())
|
||||||
|
@ -786,7 +790,6 @@ void RunCallbacks()
|
||||||
|
|
||||||
if (items_loaded) {
|
if (items_loaded) {
|
||||||
if (call_definition_update) {
|
if (call_definition_update) {
|
||||||
//call this callback even when 0 items?
|
|
||||||
SteamInventoryDefinitionUpdate_t data = {};
|
SteamInventoryDefinitionUpdate_t data = {};
|
||||||
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
|
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
|
||||||
call_definition_update = false;
|
call_definition_update = false;
|
||||||
|
|
Loading…
Reference in a new issue