Commit 0a26343b authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Convert initData as well.

parent 2892dbdf
...@@ -630,6 +630,7 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output, ...@@ -630,6 +630,7 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODEA *initData ) const DEVMODEA *initData )
{ {
UNICODE_STRING driverW, deviceW, outputW; UNICODE_STRING driverW, deviceW, outputW;
DEVMODEW *initDataW;
HDC ret; HDC ret;
if (driver) RtlCreateUnicodeStringFromAsciiz(&driverW, driver); if (driver) RtlCreateUnicodeStringFromAsciiz(&driverW, driver);
...@@ -641,13 +642,15 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output, ...@@ -641,13 +642,15 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output,
if (output) RtlCreateUnicodeStringFromAsciiz(&outputW, output); if (output) RtlCreateUnicodeStringFromAsciiz(&outputW, output);
else outputW.Buffer = NULL; else outputW.Buffer = NULL;
if (initData) initDataW = GdiConvertToDevmodeW(initData);
else initDataW = NULL;
ret = CreateDCW( driverW.Buffer, deviceW.Buffer, outputW.Buffer, ret = CreateDCW( driverW.Buffer, deviceW.Buffer, outputW.Buffer, initDataW );
(const DEVMODEW *)initData /*FIXME*/ );
RtlFreeUnicodeString(&driverW); RtlFreeUnicodeString(&driverW);
RtlFreeUnicodeString(&deviceW); RtlFreeUnicodeString(&deviceW);
RtlFreeUnicodeString(&outputW); RtlFreeUnicodeString(&outputW);
if (initDataW) HeapFree(GetProcessHeap(), 0, initDataW);
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment