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
4328e51b
Commit
4328e51b
authored
May 22, 2001
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 22, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some dll separation issues.
parent
2f6744b3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
24 deletions
+74
-24
init.c
graphics/win16drv/init.c
+12
-3
gdiobj.c
objects/gdiobj.c
+53
-13
metafile.c
objects/metafile.c
+9
-8
No files found.
graphics/win16drv/init.c
View file @
4328e51b
...
...
@@ -9,12 +9,12 @@
#include <stdlib.h>
#include <string.h>
#include "winreg.h"
#include "win16drv.h"
#include "gdi.h"
#include "bitmap.h"
#include "heap.h"
#include "font.h"
#include "options.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
win16drv
);
...
...
@@ -205,8 +205,17 @@ BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
PDEVICE_HEADER
*
pPDH
;
WIN16DRV_PDEVICE
*
physDev
;
char
printerEnabled
[
20
];
PROFILE_GetWineIniString
(
"wine"
,
"printer"
,
"off"
,
printerEnabled
,
sizeof
(
printerEnabled
)
);
HKEY
hkey
;
/* default value */
strcpy
(
printerEnabled
,
"off"
);
if
(
!
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
wine"
,
&
hkey
))
{
DWORD
type
,
count
=
sizeof
(
printerEnabled
);
RegQueryValueExA
(
hkey
,
"printer"
,
0
,
&
type
,
printerEnabled
,
&
count
);
RegCloseKey
(
hkey
);
}
if
(
strcasecmp
(
printerEnabled
,
"on"
))
{
MESSAGE
(
"Printing disabled in wine.conf or .winerc file
\n
"
);
...
...
objects/gdiobj.c
View file @
4328e51b
...
...
@@ -12,6 +12,7 @@
#include "windef.h"
#include "wingdi.h"
#include "winreg.h"
#include "winerror.h"
#include "wine/winbase16.h"
...
...
@@ -20,7 +21,6 @@
#include "font.h"
#include "heap.h"
#include "local.h"
#include "options.h"
#include "palette.h"
#include "pen.h"
#include "region.h"
...
...
@@ -173,6 +173,28 @@ HBITMAP hPseudoStockBitmap; /* 1x1 bitmap for memory DCs */
static
SYSLEVEL
GDI_level
=
{
CRITICAL_SECTION_INIT
,
3
};
static
WORD
GDI_HeapSel
;
static
BOOL
get_bool
(
char
*
buffer
,
BOOL
def_value
)
{
switch
(
buffer
[
0
])
{
case
'n'
:
case
'N'
:
case
'f'
:
case
'F'
:
case
'0'
:
return
FALSE
;
case
'y'
:
case
'Y'
:
case
't'
:
case
'T'
:
case
'1'
:
return
TRUE
;
default:
return
def_value
;
}
}
/******************************************************************************
*
...
...
@@ -203,32 +225,50 @@ static void ReadFontInformation(
int
defStrikeOut
)
{
char
key
[
256
];
char
buffer
[
MAX_PATH
];
HKEY
hkey
;
DWORD
type
,
count
;
/* In order for the stock fonts to be independent of
* mapping mode, the height (& width) must be 0
*/
/* assign defaults */
font
->
logfont
.
lfHeight
=
defHeight
;
font
->
logfont
.
lfWeight
=
defBold
;
font
->
logfont
.
lfItalic
=
defItalic
;
font
->
logfont
.
lfUnderline
=
defUnderline
;
font
->
logfont
.
lfStrikeOut
=
defStrikeOut
;
if
(
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
Tweak.Fonts"
,
&
hkey
))
return
;
sprintf
(
key
,
"%s.Height"
,
fontName
);
font
->
logfont
.
lfHeight
=
PROFILE_GetWineIniInt
(
"Tweak.Fonts"
,
key
,
defHeight
);
count
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hkey
,
key
,
0
,
&
type
,
buffer
,
&
count
))
font
->
logfont
.
lfHeight
=
atoi
(
buffer
);
sprintf
(
key
,
"%s.Bold"
,
fontName
);
font
->
logfont
.
lfWeight
=
(
PROFILE_GetWineIniBool
(
"Tweak.Fonts"
,
key
,
defBold
))
?
FW_BOLD
:
FW_NORMAL
;
count
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hkey
,
key
,
0
,
&
type
,
buffer
,
&
count
))
font
->
logfont
.
lfWeight
=
get_bool
(
buffer
,
defBold
)
?
FW_BOLD
:
FW_NORMAL
;
sprintf
(
key
,
"%s.Italic"
,
fontName
);
font
->
logfont
.
lfItalic
=
PROFILE_GetWineIniBool
(
"Tweak.Fonts"
,
key
,
defItalic
);
count
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hkey
,
key
,
0
,
&
type
,
buffer
,
&
count
))
font
->
logfont
.
lfItalic
=
get_bool
(
buffer
,
defItalic
);
sprintf
(
key
,
"%s.Underline"
,
fontName
);
font
->
logfont
.
lfUnderline
=
PROFILE_GetWineIniBool
(
"Tweak.Fonts"
,
key
,
defUnderline
);
count
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hkey
,
key
,
0
,
&
type
,
buffer
,
&
count
))
font
->
logfont
.
lfUnderline
=
get_bool
(
buffer
,
defUnderline
);
sprintf
(
key
,
"%s.StrikeOut"
,
fontName
);
font
->
logfont
.
lfStrikeOut
=
PROFILE_GetWineIniBool
(
"Tweak.Fonts"
,
key
,
defStrikeOut
);
count
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hkey
,
key
,
0
,
&
type
,
buffer
,
&
count
))
font
->
logfont
.
lfStrikeOut
=
get_bool
(
buffer
,
defStrikeOut
);
return
;
RegCloseKey
(
hkey
)
;
}
/***********************************************************************
...
...
objects/metafile.c
View file @
4328e51b
...
...
@@ -93,15 +93,16 @@ HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh)
HMETAFILE16
MF_Create_HMETAFILE16
(
METAHEADER
*
mh
)
{
HMETAFILE16
hmf
;
DWORD
size
;
if
(
mh
->
mtType
==
METAFILE_MEMORY
)
size
=
mh
->
mtSize
*
sizeof
(
WORD
);
else
size
=
sizeof
(
METAHEADER
)
+
sizeof
(
METAHEADERDISK
);
DWORD
size
=
mh
->
mtSize
*
sizeof
(
WORD
);
hmf
=
GLOBAL_CreateBlock
(
GMEM_MOVEABLE
,
mh
,
mh
->
mtSize
*
sizeof
(
WORD
),
GetCurrentPDB16
(),
WINE_LDT_FLAGS_DATA
);
hmf
=
GlobalAlloc16
(
GMEM_MOVEABLE
,
size
);
if
(
hmf
)
{
METAHEADER
*
mh_dest
=
GlobalLock16
(
hmf
);
memcpy
(
mh_dest
,
mh
,
size
);
GlobalUnlock16
(
hmf
);
}
HeapFree
(
GetProcessHeap
(),
0
,
mh
);
return
hmf
;
}
...
...
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