fixed windows builds 2

This commit is contained in:
2025-07-20 13:33:42 +03:00
parent fb4c201921
commit 69d149515a
6 changed files with 22 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
#include "baseentity.h"
#include "tier0/platform.h"
#include "tier1/utlstring.h"
#include <winscard.h>
CBaseEntity::CBaseEntity()
{

View File

@@ -94,9 +94,10 @@ void IEngine::Init()
#endif
#ifdef STEAM_ENABLED
if (!SteamAPI_Init())
SteamErrMsg err;
if (SteamAPI_InitEx(&err) != k_ESteamAPIInitResult_OK)
{
Plat_FatalErrorFunc("Failed to init Steam\n");
Plat_FatalErrorFunc("Failed to init Steam: %s\n", err);
}
#endif
@@ -129,9 +130,11 @@ void IEngine::Init()
Console()->AddCommand("exec default.cfg;");
Console()->Execute();
if (INetworking::IsClient())
{
MainMenu()->Init();
IConsoleUI::Init();
}
};
@@ -141,7 +144,8 @@ void IEngine::Init()
void IEngine::Frame(float fDelta)
{
IServer::Think(fDelta);
if (!ICommandLine::CheckParam("-dedicated"))
if (INetworking::IsClient())
{
MainMenu()->Frame();
IFGUI::Frame();
@@ -154,6 +158,7 @@ void IEngine::Frame(float fDelta)
//-----------------------------------------------------------------------------
void IEngine::Shutdown()
{
if (INetworking::IsClient())
MainMenu()->Deinit();
INetworking::Deinit();
};

View File

@@ -152,7 +152,6 @@ void IInput::KeyEvent( EInputKey key, EKeyEventType event )
if (g_inputModeStack[g_inputModeStack.GetSize()-1] != INPUT_MODE_MENU)
{
V_printf("no menu\n");
MainMenu()->SetVisibility(false);
}
return;

View File

@@ -69,7 +69,7 @@ static CClientNetworkingCallbacks *net_pClientCallbacks;
void INetworking::Init()
{
/*
Net_Init();
#ifdef STEAMNETWORKINGSOCKETS_OPENSOURCE
@@ -112,8 +112,14 @@ void INetworking::Init()
{
net_listenSocket = SteamGameServerNetworkingSockets()->CreateListenSocketP2P(0, 0, NULL);
net_bIsServer = true;
} else {
V_printf("Cool\n");
if (ICommandLine::ParamValue("-connect"))
{
Console()->AddCommand(CUtlString("connect %s;", ICommandLine::ParamValue("-connect")));
};
}
*/
}
void INetworking::Deinit()
{

View File

@@ -54,6 +54,7 @@ void IServer::Think( float fDelta )
/* tickrate */
while(g_fAccumulator>=fTickrate)
{
if (INetworking::IsClient())
IInput::Frame();
Console()->Execute();
g_fAccumulator-=fTickrate;

View File

@@ -1354,7 +1354,6 @@ IGraphicsPipeline *CVkRenderer::CreateGraphicsPipeline(
allocInfo.descriptorSetCount = 1;
allocInfo.pSetLayouts = &pipeline->m_pipeline.m_descriptorSetLayout;
vkAllocateDescriptorSets(g_vkDevice, &allocInfo, &pipeline->m_descriptorSet);
V_printf("Created %p\n",pipeline->m_descriptorSet);
pipeline->m_writes = {};
for (auto &input: inputs)