Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2fb8ea4d
Commit
2fb8ea4d
authored
Oct 03, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Oct 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Make the user backend work on non-latin1 locales.
parent
caa2425a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
user.c
programs/wineconsole/user.c
+11
-2
No files found.
programs/wineconsole/user.c
View file @
2fb8ea4d
...
@@ -21,12 +21,15 @@
...
@@ -21,12 +21,15 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include "winecon_user.h"
#include "winecon_user.h"
#include "winnls.h"
#include "wine/debug.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wineconsole
);
WINE_DEFAULT_DEBUG_CHANNEL
(
wineconsole
);
WINE_DECLARE_DEBUG_CHANNEL
(
wc_font
);
WINE_DECLARE_DEBUG_CHANNEL
(
wc_font
);
UINT
g_uiDefaultCharset
;
/* mapping console colors to RGB values */
/* mapping console colors to RGB values */
COLORREF
WCUSER_ColorMap
[
16
]
=
COLORREF
WCUSER_ColorMap
[
16
]
=
{
{
...
@@ -342,7 +345,7 @@ BOOL WCUSER_ValidateFontMetric(const struct inner_data* data, const TEXTMETRIC*
...
@@ -342,7 +345,7 @@ BOOL WCUSER_ValidateFontMetric(const struct inner_data* data, const TEXTMETRIC*
ret
=
(
tm
->
tmMaxCharWidth
*
data
->
curcfg
.
win_width
<
GetSystemMetrics
(
SM_CXSCREEN
)
&&
ret
=
(
tm
->
tmMaxCharWidth
*
data
->
curcfg
.
win_width
<
GetSystemMetrics
(
SM_CXSCREEN
)
&&
tm
->
tmHeight
*
data
->
curcfg
.
win_height
<
GetSystemMetrics
(
SM_CYSCREEN
));
tm
->
tmHeight
*
data
->
curcfg
.
win_height
<
GetSystemMetrics
(
SM_CYSCREEN
));
return
ret
&&
!
tm
->
tmItalic
&&
!
tm
->
tmUnderlined
&&
!
tm
->
tmStruckOut
&&
return
ret
&&
!
tm
->
tmItalic
&&
!
tm
->
tmUnderlined
&&
!
tm
->
tmStruckOut
&&
(
tm
->
tmCharSet
==
DEFAULT_CHARSET
||
tm
->
tmCharSet
==
ANSI_CHARSET
);
(
tm
->
tmCharSet
==
DEFAULT_CHARSET
||
tm
->
tmCharSet
==
g_uiDefaultCharset
);
}
}
/******************************************************************
/******************************************************************
...
@@ -354,7 +357,7 @@ BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf)
...
@@ -354,7 +357,7 @@ BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf)
{
{
return
(
lf
->
lfPitchAndFamily
&
3
)
==
FIXED_PITCH
&&
return
(
lf
->
lfPitchAndFamily
&
3
)
==
FIXED_PITCH
&&
/* (lf->lfPitchAndFamily & 0xF0) == FF_MODERN && */
/* (lf->lfPitchAndFamily & 0xF0) == FF_MODERN && */
(
lf
->
lfCharSet
==
DEFAULT_CHARSET
||
lf
->
lfCharSet
==
ANSI_CHARSET
);
(
lf
->
lfCharSet
==
DEFAULT_CHARSET
||
lf
->
lfCharSet
==
g_uiDefaultCharset
);
}
}
/******************************************************************
/******************************************************************
...
@@ -1382,6 +1385,12 @@ enum init_return WCUSER_InitBackend(struct inner_data* data)
...
@@ -1382,6 +1385,12 @@ enum init_return WCUSER_InitBackend(struct inner_data* data)
static
const
WCHAR
wClassName
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
'C'
,
'o'
,
'n'
,
's'
,
'o'
,
'l'
,
'e'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
static
const
WCHAR
wClassName
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
'C'
,
'o'
,
'n'
,
's'
,
'o'
,
'l'
,
'e'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
WNDCLASS
wndclass
;
WNDCLASS
wndclass
;
CHARSETINFO
ci
;
if
(
!
TranslateCharsetInfo
((
DWORD
*
)(
INT_PTR
)
GetACP
(),
&
ci
,
TCI_SRCCODEPAGE
))
return
init_failed
;
g_uiDefaultCharset
=
ci
.
ciCharset
;
WINE_TRACE_
(
wc_font
)(
"Code page %d => Default charset: %d
\n
"
,
GetACP
(),
g_uiDefaultCharset
);
data
->
private
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
inner_data_user
));
data
->
private
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
struct
inner_data_user
));
if
(
!
data
->
private
)
return
init_failed
;
if
(
!
data
->
private
)
return
init_failed
;
...
...
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