fix windows build scripts, add windows opus support

This commit is contained in:
HappyDOGE
2022-07-28 14:27:56 +03:00
parent 90cd6e0e15
commit 3faf6a69ac
149 changed files with 396 additions and 170 deletions
+4 -4
View File
@@ -2493,7 +2493,7 @@ void CWin32Surface::CreatePopup(VPANEL panel, bool minimised, bool showTaskbarIc
plat->textureDC = NULL;
::SetBkMode(plat->hdc, TRANSPARENT);
::SetWindowLong(plat->hwnd, GWL_USERDATA, (LONG)g_pIVgui->PanelToHandle(panel));
::SetWindowLongPtr(plat->hwnd, GWLP_USERDATA, (LONG_PTR)g_pIVgui->PanelToHandle(panel));
::SetTextAlign(plat->hdc, TA_LEFT | TA_TOP | TA_UPDATECP);
if (!((VPanel *)panel)->IsVisible() || panel == _embeddedPanel)
@@ -2514,7 +2514,7 @@ void CWin32Surface::CreatePopup(VPANEL panel, bool minimised, bool showTaskbarIc
else
{
// somehow getting added twice, fundamental problem
_asm int 3;
Assert(0);
}
// hack, force a windows sound to be played
@@ -2571,7 +2571,7 @@ void CWin32Surface::ReleasePanel(VPANEL panel)
SetPanelVisible(panel, false);
// free all the windows/bitmap/DC handles we are using
::SetWindowLong(plat->hwnd, GWL_USERDATA, (LONG)-1);
::SetWindowLongPtr(plat->hwnd, GWLP_USERDATA, (LONG_PTR)-1);
::SetWindowPos(plat->hwnd, HWND_BOTTOM, 0, 0, 1, 1, SWP_NOREDRAW|SWP_HIDEWINDOW);
// free the window context
@@ -3721,7 +3721,7 @@ static LRESULT CALLBACK staticProc(HWND hwnd,UINT msg,WPARAM wparam,LPARAM lpara
if (staticSurfaceAvailable)
{
panel = g_pIVgui->HandleToPanel(::GetWindowLong(hwnd, GWL_USERDATA));
panel = g_pIVgui->HandleToPanel((LONG)::GetWindowLongPtr(hwnd, GWLP_USERDATA));
if (panel)
{
+3 -3
View File
@@ -34,14 +34,14 @@ def build(bld):
'vgui_key_translation.cpp',
'VPanel.cpp',
'VPanelWrapper.cpp',
'keyrepeat.cpp'
'keyrepeat.cpp',
'../../public/tier0/memoverride.cpp'
]
if bld.env.DEST_OS == 'win32':
source += [
'Surface.cpp',
'System.cpp',
'../../public/tier0/memoverride.cpp'
'System.cpp'
]
else:
source += [
+4 -2
View File
@@ -53,6 +53,8 @@
#undef GetCurrentDirectory
#endif
#include <time.h>
// memdbgon must be the last include file in a .cpp file!!!
#include <tier0/memdbgon.h>
@@ -1238,7 +1240,7 @@ void FileOpenDialog::PopulateFileList()
kv->SetString( "attributes", g_pFullFileSystem->IsFileWritable( pFullPath )? "" : "R" );
long fileModified = g_pFullFileSystem->GetFileTime( pFullPath );
time_t fileModified = g_pFullFileSystem->GetFileTime( pFullPath );
g_pFullFileSystem->FileTimeToString( pszFileModified, sizeof( pszFileModified ), fileModified );
kv->SetString( "modified", pszFileModified );
@@ -1277,7 +1279,7 @@ void FileOpenDialog::PopulateFileList()
kv->SetString( "attributes", g_pFullFileSystem->IsFileWritable( pFullPath )? "" : "R" );
long fileModified = g_pFullFileSystem->GetFileTime( pFullPath );
time_t fileModified = g_pFullFileSystem->GetFileTime( pFullPath );
g_pFullFileSystem->FileTimeToString( pszFileModified, sizeof( pszFileModified ), fileModified );
kv->SetString( "modified", pszFileModified );