[PATCH vkd3d 2/2] demos: Support building on Windows without -DUNICODE.

Alexandre Julliard julliard at winehq.org
Wed Feb 23 09:56:19 CST 2022


Henri Verbeet <hverbeet at gmail.com> writes:

> On Wed, 23 Feb 2022 at 16:03, Alexandre Julliard <julliard at winehq.org> wrote:
>> Henri Verbeet <hverbeet at gmail.com> writes:
>> > On Tue, 22 Feb 2022 at 20:00, Alexandre Julliard <julliard at winehq.org> wrote:
>> >> diff --git a/demos/gears.c b/demos/gears.c
>> >> index 2045b3cdd842..9ed87b1084cf 100644
>> >> --- a/demos/gears.c
>> >> +++ b/demos/gears.c
>> >> @@ -877,7 +877,7 @@ static int cxg_main(void)
>> >>      return EXIT_SUCCESS;
>> >>  }
>> >>
>> >> -#ifdef _WIN32
>> >> +#if defined(_WIN32) && defined(_UNICODE)
>> >>  int wmain(void)
>> >>  #else
>> >>  int main(void)
>> >
>> > Shouldn't that check for "defined(UNICODE)" instead? As-is, this
>> > breaks "make crosstest":
>>
>> Actually, is there a reason we are using -municode for crosstests?
>>
> I don't think there's a strong reason. IIRC it was just for making
> sure we get the W-variants of functions by default. I.e., preventing
> accidents along the lines of using CreateWindowExW() in
> demo_window_create(), but then using DefWindowProc() in
> demo_window_proc().

This would then require the Mingw build to force -municode as well. Do
you want this, or should I remove -municode?

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list