Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
933733ce
Commit
933733ce
authored
Aug 15, 2002
by
Huw D M Davies
Committed by
Alexandre Julliard
Aug 15, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get the initial paper size from the locale info.
parent
6b5aaa11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
init.c
dlls/wineps/init.c
+19
-2
No files found.
dlls/wineps/init.c
View file @
933733ce
...
...
@@ -444,6 +444,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
DWORD
ppdType
;
char
*
ppdFileName
=
NULL
;
HKEY
hkey
;
BOOL
using_default_devmode
=
FALSE
;
TRACE
(
"'%s'
\n
"
,
name
);
...
...
@@ -473,8 +474,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
goto
cleanup
;
memcpy
(
pi
->
Devmode
,
&
DefaultDevmode
,
sizeof
(
DefaultDevmode
)
);
strcpy
(
pi
->
Devmode
->
dmPublic
.
dmDeviceName
,
name
);
DrvSetPrinterData16
((
LPSTR
)
name
,
(
LPSTR
)
INT_PD_DEFAULT_DEVMODE
,
REG_BINARY
,
(
LPBYTE
)
&
DefaultDevmode
,
sizeof
(
DefaultDevmode
)
);
using_default_devmode
=
TRUE
;
/* need to do something here AddPrinter?? */
}
...
...
@@ -560,6 +560,23 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
goto
closeprinter
;
}
if
(
using_default_devmode
)
{
DWORD
papersize
;
if
(
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_IPAPERSIZE
|
LOCALE_RETURN_NUMBER
,
(
LPWSTR
)
&
papersize
,
sizeof
(
papersize
)))
{
PSDRV_DEVMODEA
dm
;
memset
(
&
dm
,
0
,
sizeof
(
dm
));
dm
.
dmPublic
.
dmFields
=
DM_PAPERSIZE
;
dm
.
dmPublic
.
u1
.
s1
.
dmPaperSize
=
papersize
;
PSDRV_MergeDevmodes
(
pi
->
Devmode
,
&
dm
,
pi
);
}
DrvSetPrinterData16
((
LPSTR
)
name
,
(
LPSTR
)
INT_PD_DEFAULT_DEVMODE
,
REG_BINARY
,
(
LPBYTE
)
pi
->
Devmode
,
sizeof
(
DefaultDevmode
)
);
}
/*
* This is a hack. The default paper size should be read in as part of
* the Devmode structure, but Wine doesn't currently provide a convenient
...
...
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