Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
66b17023
Kaydet (Commit)
66b17023
authored
Kas 17, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
windows: Improve logging.
Change-Id: I15e6d240b3c94af07e9b39cc16efb581869729f2
üst
3852d469
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
59 deletions
+35
-59
saldata.hxx
vcl/inc/win/saldata.hxx
+1
-1
OpenGLContext.cxx
vcl/source/opengl/OpenGLContext.cxx
+16
-3
salframe.cxx
vcl/win/source/window/salframe.cxx
+18
-55
No files found.
vcl/inc/win/saldata.hxx
Dosyayı görüntüle @
66b17023
...
@@ -183,7 +183,7 @@ LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
...
@@ -183,7 +183,7 @@ LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
void
EmitTimerCallback
();
void
EmitTimerCallback
();
void
SalTestMouseLeave
();
void
SalTestMouseLeave
();
bool
ImplWriteLastError
(
DWORD
lastError
,
const
char
*
szApiCall
);
void
ImplWriteLastError
(
DWORD
lastError
,
const
char
*
szApiCall
);
long
ImplHandleSalObjKeyMsg
(
HWND
hWnd
,
UINT
nMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
long
ImplHandleSalObjKeyMsg
(
HWND
hWnd
,
UINT
nMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
long
ImplHandleSalObjSysCharMsg
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
);
long
ImplHandleSalObjSysCharMsg
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
);
...
...
vcl/source/opengl/OpenGLContext.cxx
Dosyayı görüntüle @
66b17023
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
#include <postmac.h>
#include <postmac.h>
#endif
#endif
#if defined( WNT )
#include <win/saldata.hxx>
#endif
using
namespace
com
::
sun
::
star
;
using
namespace
com
::
sun
::
star
;
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
...
@@ -765,7 +769,8 @@ bool OpenGLContext::init(HDC hDC, HWND hWnd)
...
@@ -765,7 +769,8 @@ bool OpenGLContext::init(HDC hDC, HWND hWnd)
bool
OpenGLContext
::
ImplInit
()
bool
OpenGLContext
::
ImplInit
()
{
{
SAL_INFO
(
"vcl.opengl"
,
"OpenGLContext::ImplInit----start"
);
SAL_INFO
(
"vcl.opengl"
,
"OpenGLContext::ImplInit----start"
);
PIXELFORMATDESCRIPTOR
PixelFormatFront
=
// PixelFormat Tells Windows How We Want Things To Be
// PixelFormat tells Windows how we want things to be
PIXELFORMATDESCRIPTOR
PixelFormatFront
=
{
{
sizeof
(
PIXELFORMATDESCRIPTOR
),
sizeof
(
PIXELFORMATDESCRIPTOR
),
1
,
// Version Number
1
,
// Version Number
...
@@ -813,17 +818,25 @@ bool OpenGLContext::ImplInit()
...
@@ -813,17 +818,25 @@ bool OpenGLContext::ImplInit()
return
false
;
return
false
;
}
}
SetPixelFormat
(
m_aGLWin
.
hDC
,
WindowPix
,
&
PixelFormatFront
);
if
(
!
SetPixelFormat
(
m_aGLWin
.
hDC
,
WindowPix
,
&
PixelFormatFront
))
{
ImplWriteLastError
(
GetLastError
(),
"SetPixelFormat in OpenGLContext::ImplInit"
);
SAL_WARN
(
"vcl.opengl"
,
"SetPixelFormat failed"
);
return
false
;
}
m_aGLWin
.
hRC
=
wglCreateContext
(
m_aGLWin
.
hDC
);
m_aGLWin
.
hRC
=
wglCreateContext
(
m_aGLWin
.
hDC
);
if
(
m_aGLWin
.
hRC
==
NULL
)
if
(
m_aGLWin
.
hRC
==
NULL
)
{
{
ImplWriteLastError
(
GetLastError
(),
"wglCreateContext in OpenGLContext::ImplInit"
);
SAL_WARN
(
"vcl.opengl"
,
"wglCreateContext failed"
);
SAL_WARN
(
"vcl.opengl"
,
"wglCreateContext failed"
);
return
false
;
return
false
;
}
}
if
(
!
wglMakeCurrent
(
m_aGLWin
.
hDC
,
m_aGLWin
.
hRC
))
if
(
!
wglMakeCurrent
(
m_aGLWin
.
hDC
,
m_aGLWin
.
hRC
))
{
{
SAL_WARN
(
"vcl.opengl"
,
"wglMakeCurrent failed: "
<<
GetLastError
());
ImplWriteLastError
(
GetLastError
(),
"wglMakeCurrent in OpenGLContext::ImplInit"
);
SAL_WARN
(
"vcl.opengl"
,
"wglMakeCurrent failed"
);
return
false
;
return
false
;
}
}
...
...
vcl/win/source/window/salframe.cxx
Dosyayı görüntüle @
66b17023
...
@@ -5974,64 +5974,27 @@ bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LR
...
@@ -5974,64 +5974,27 @@ bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LR
return
bResult
;
return
bResult
;
}
}
bool
ImplWriteLastError
(
DWORD
lastError
,
const
char
*
szApiCall
)
void
ImplWriteLastError
(
DWORD
lastError
,
const
char
*
szApiCall
)
{
{
static
int
first
=
1
;
#if OSL_DEBUG_LEVEL > 0
// if VCL_LOGFILE_ENABLED is set, Win32 API error messages can be written
LPVOID
lpMsgBuf
;
// to %TMP%/vcl.log or %TEMP%/vcl.log
if
(
FormatMessageA
(
static
char
*
logEnabled
=
getenv
(
"VCL_LOGFILE_ENABLED"
);
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
if
(
logEnabled
)
FORMAT_MESSAGE_FROM_SYSTEM
|
{
FORMAT_MESSAGE_IGNORE_INSERTS
,
bool
bSuccess
=
FALSE
;
NULL
,
static
char
*
szTmp
=
getenv
(
"TMP"
);
lastError
&
0xffff
,
if
(
!
szTmp
||
!*
szTmp
)
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
// Default language
szTmp
=
getenv
(
"TEMP"
);
(
LPTSTR
)
&
lpMsgBuf
,
if
(
szTmp
&&
*
szTmp
)
0
,
{
NULL
))
char
fname
[
5000
];
{
strcpy
(
fname
,
szTmp
);
SAL_WARN
(
"vcl"
,
"API call: "
<<
szApiCall
<<
" returned "
<<
lastError
<<
" (0x"
<<
std
::
hex
<<
lastError
<<
"): "
<<
(
LPTSTR
)
lpMsgBuf
);
if
(
fname
[
strlen
(
fname
)
-
1
]
!=
'\\'
)
LocalFree
(
lpMsgBuf
);
strcat
(
fname
,
"
\\
"
);
strcat
(
fname
,
"vcl.log"
);
FILE
*
fp
=
fopen
(
fname
,
"a"
);
// always append
if
(
fp
)
{
if
(
first
)
{
first
=
0
;
fprintf
(
fp
,
"Process ID: %ld (0x%lx)
\n
"
,
GetCurrentProcessId
(),
GetCurrentProcessId
()
);
}
time_t
aclock
;
time
(
&
aclock
);
// Get time in seconds
struct
tm
*
newtime
=
localtime
(
&
aclock
);
// Convert time to struct tm form
fprintf
(
fp
,
asctime
(
newtime
)
);
// print time stamp
fprintf
(
fp
,
"%s returned %lu (0x%lx)
\n
"
,
szApiCall
,
lastError
,
lastError
);
bSuccess
=
TRUE
;
// may be FormatMessage fails but we wrote at least the error code
LPVOID
lpMsgBuf
;
if
(
FormatMessageA
(
FORMAT_MESSAGE_ALLOCATE_BUFFER
|
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
lastError
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
// Default language
(
LPSTR
)
&
lpMsgBuf
,
0
,
NULL
))
{
fprintf
(
fp
,
" %s
\n
"
,
(
LPSTR
)
lpMsgBuf
);
LocalFree
(
lpMsgBuf
);
}
fclose
(
fp
);
}
}
return
bSuccess
;
}
}
else
else
return
TRUE
;
SAL_WARN
(
"vcl"
,
"API call: "
<<
szApiCall
<<
" returned "
<<
lastError
<<
" (0x"
<<
std
::
hex
<<
lastError
<<
")"
);
#endif
}
}
#ifdef _WIN32
#ifdef _WIN32
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment