.NET10 Migration (#946)

Runtime and build
- Move all projects to .NET 10 with SDK-style project files and a shared
  Directory.Build.props (WIN/LINUX, x86/x64 defines)
- Load managed and unmanaged dependencies from libs/managed and
  libs/unmanaged through assembly and native library resolvers
- Compile party modes with Roslyn instead of CodeDom
- Update AppVeyor to the .NET 10 SDK and dotnet test
- Download the FFmpeg and gstreamer runtimes from the dependencies
  repository during the build
- Remove the VC++ 2015-2022 runtime check, no dependency needs it anymore

Graphics and windowing
- Replace the Direct3D 9 renderer with Direct3D 11 (Vortice)
- Pace Direct3D 11 frames with a frame latency waitable swap chain
- Move window, input and message boxes to SDL3
- Replace System.Drawing with SkiaSharp and WinForms with SDL3 and a
  software renderer

Video and audio
- Replace Acinerella with FFmpeg 8.1.3 (FFmpeg.AutoGen)
- Add hardware accelerated video decoding (D3D11VA, DXVA2, VideoToolbox,
  VAAPI, VDPAU) with software fallback
- Convert YUV video frames to RGB on the GPU in Direct3D 11 and OpenGL
- Add the video options HardwareDecoding, GpuColorConversion,
  DecoderThreads and VideoDownscaleResolution
- Update OpenAL to OpenTK 4 and NAudio recording to WasapiRecorder

Fixes
- Fix the song preview start and shorten the reporter buttons
- Fix a crash when opening the highscore without a selected song
- Use the options slide highlight in the party mode screens to avoid
  brightness flicker on VRR displays
- Disable GameInput in the x86 build, SDL3 crashes in GameInputCreate
  on 32-bit systems with the GameInput runtime installed
- Fix a truncation warning in PitchTracker
This commit is contained in:
McSchneidar authored and GitHub committed 2026-11-02 08:11:20 +01:00
1 parent 5767914372
commit cf2fa796e2
176 files changed
+5218 -8042

No files matched your search

-13
View File
@@ -1,13 +0,0 @@
choco install gitlink --version 3.1.0-unstable0017 --pre --no-progress --limit-output
Get-ChildItem -Path ".\Output" -Recurse "*.pdb" | %{
If ($_.Fullname -contains 'PitchTracker.pdb'){
& gitlink -u "`"https://github.com/$($Env:APPVEYOR_REPO_NAME)`"" -a --baseDir "`"$Env:APPVEYOR_BUILD_FOLDER`"" --commit "`"$Env:APPVEYOR_REPO_COMMIT`"" "`"$($_.Fullname)`""
}
else{
& gitlink -u "`"https://github.com/$($Env:APPVEYOR_REPO_NAME)`"" --baseDir "`"$Env:APPVEYOR_BUILD_FOLDER`"" --commit "`"$Env:APPVEYOR_REPO_COMMIT`"" "`"$($_.Fullname)`""
}
}
# srcsrv were integrated in the pdb files -> delete the srcsrv files
Remove-Item ".\Output\*.pdb.srcsrv"
+8
View File
@@ -1,4 +1,5 @@
obj
bin
PitchTracker.dll
Thumbs.db
.transifexrc
@@ -43,6 +44,13 @@ tx.exe
/Output/Vocaluxe_x64.exe*
/Output/Vocaluxe.vshost.exe*
/Output/VocaluxeLib.dll
/Output/Vocaluxe
/Output/Vocaluxe.dll
/Output/Vocaluxe.runtimeconfig.json
/Output/*.so
/Output/*.dylib
/Output/runtimes
/Output/PartyModes/*/*.dll
/Output/Photos
/Output/Screenshots
/Output/Website
+57
View File
@@ -0,0 +1,57 @@
<Project>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Configurations>DebugWin;ReleaseWin;InstallerWin;DebugLinux;ReleaseLinux</Configurations>
<Platforms>AnyCPU;x86;x64</Platforms>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<Prefer32Bit>false</Prefer32Bit>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CheckingRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="Exists('$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs')">
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.StartsWith('Debug'))">
<Optimize>false</Optimize>
<DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="!$(Configuration.StartsWith('Debug'))">
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.EndsWith('Win'))">
<DefineConstants>$(DefineConstants);WIN</DefineConstants>
<NoWarn>$(NoWarn);CA1416</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.EndsWith('Linux'))">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'InstallerWin'">
<DefineConstants>$(DefineConstants);INSTALLER</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'x86'">
<PlatformTarget>x86</PlatformTarget>
<DefineConstants>$(DefineConstants);ARCH_X86</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'x64'">
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>$(DefineConstants);ARCH_X64</DefineConstants>
</PropertyGroup>
</Project>
+12 -26
View File
@@ -4,26 +4,19 @@ Runing Vocaluxe on Linux is not offically supported yet -but you can try it your
(the problematic part is fullfilling the runtime dependencies)
* Install ffmpeg 3.2 (a quick and dirty compile script can be found here: [installFFmpeg.sh](https://github.com/lukeIam/Vocaluxe/blob/travis/.travis/installFFmpeg.sh) )
* Get sure your gcc and g++ version is >= 4.8
* Install at least mono 5.8.0 ([HowTo install mono](http://www.mono-project.com/download/stable/))
* Clone the repository
You want to use this branch as it contains some linux specific changes
(compiles on Ubuntu 14.04): [travis@lukeIam/Vocaluxe](https://github.com/lukeIam/Vocaluxe/tree/travis)
* Navigate to the travis branch and execute (commands from [.travis.yml](https://github.com/lukeIam/Vocaluxe/blob/travis/.travis.yml)):
* Install the [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)
* Get sure gcc, g++, make and pkg-config are installed
* Install the runtime dependencies:
- FFmpeg 8 (libavformat 62, libavcodec 62, libavutil 60, libswscale 9, libswresample 6)
- portaudio
- hidapi (libhidapi-libusb)
- openal (optional, only needed for the OpenAL playback)
- gstreamer 1.0 (optional, only needed for the GStreamer playback)
* Clone the repository and execute in its folder:
```bash
chmod ugo+x ./.build/linuxPostBuildEvent.sh
chmod ugo+x ./.build/linuxPreBuildEvent.sh
chmod ugo+x ./.travis/gitDescribe.sh
wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -P ./.travis/
config=Linux platform=x64
# ./.travis/gitDescribe.sh
mono ./.travis/nuget.exe restore
make -C PitchTracker
make -C Vocaluxe/Lib/Video/Acinerella
msbuild /p:Configuration=Release$config /p:Platform=$platform /p:TargetFrameworkVersion=v4.7 Vocaluxe.sln
make
```
* The build should complete without errors
* change to the Output directory:
@@ -32,15 +25,8 @@ cd Output
```
* Start Vocaluxe:
```bash
mono Vocaluxe.exe
./Vocaluxe
```
* Vocaluxe will start (you will see the splash screen) and then crash because runtime dependencies are missing
Required dependencies (by heart - can be incorrect and incomplete):
- gstreamer 1.0
- ffmpeg 3.2 (maybe we can use the build script which builds the libs at the moment)
- hidapi
- libgstreamersharpglue-1.0.0
- portaudio
- ?
* If GStreamer is not installed, set `PlayBackLib` to `PortAudio` in the `Config.xml`
* If yo make some progress we would be happy if you share it with us in a pull request/issue.
+1 -1
View File
@@ -9,7 +9,7 @@
![url](https://cloud.githubusercontent.com/assets/5115160/4995708/bc5af234-69c2-11e4-91d1-112972f35f01.PNG)
* Make sure [Visual Studio 2012/2013(?)](http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop) is installed
* Make sure [Visual Studio 2026](https://visualstudio.microsoft.com/downloads/) with the workloads `.NET desktop development` and `Desktop development with C++` and the [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) are installed
* Make sure [Node.js (LTS)](https://nodejs.org) is installed. It is needed to build the WebApp (folder `WebApp`), which is built automatically together with the project `VocaluxeWeb`. Restart Visual Studio after installing it.
+7 -2
View File
@@ -389,11 +389,16 @@
<string name="TR_SCREENPSERVERQR_ADDRESS">Server address</string>
<string name="TR_SCREENPSERVERQR_NOTRUNNING">Server is not running. Please activate it and restart the game!</string>
<string name="TR_REPORTER_TITLE_TEXT">We are sorry</string>
<string name="TR_REPORTER_MESSAGE_CRASH_TEXT">that Vocaluxe run into an error and crashed.\r\nTo help us fix the problem please send us a report.\r\nEdit the following log before submitting to remove possibly sensitive information.</string>
<string name="TR_REPORTER_MESSAGE_NO_CRASH_TEXT">that you experienced an error.\r\nTo help us fix the problem please send us a report.\r\nEdit the following log before submitting to remove possibly sensitive information.</string>
<string name="TR_REPORTER_MESSAGE_CRASH_TEXT">that Vocaluxe run into an error and crashed.\r\nTo help us fix the problem please send us a report.\r\nOpen the log to check it and remove possibly sensitive information before submitting.</string>
<string name="TR_REPORTER_MESSAGE_NO_CRASH_TEXT">that you experienced an error.\r\nTo help us fix the problem please send us a report.\r\nOpen the log to check it and remove possibly sensitive information before submitting.</string>
<string name="TR_REPORTER_NO_UPLOAD_TEXT">Do not upload anything (you can still copy the error message above)</string>
<string name="TR_REPORTER_GIST_AND_ISSUE_TEXT">Upload and open an issue (publicly visible + requires a github account)</string>
<string name="TR_REPORTER_GIST_ONLY_TEXT">Upload and get a link to your report (publicly visible)</string>
<string name="TR_REPORTER_OPEN_LOG_TEXT">Open the log to check or edit it</string>
<string name="TR_REPORTER_NO_UPLOAD_BUTTON">Don't upload</string>
<string name="TR_REPORTER_GIST_AND_ISSUE_BUTTON">Upload + issue</string>
<string name="TR_REPORTER_GIST_ONLY_BUTTON">Upload</string>
<string name="TR_REPORTER_OPEN_LOG_BUTTON">Open log</string>
<string name="TR_REPORTER_SUBMIT_STEP0_TEXT">Submit</string>
<string name="TR_REPORTER_SUBMIT_STEP1_TEXT">Uploading</string>
<string name="TR_REPORTER_SUBMIT_STEP2_EXIT_TEXT">Exit</string>
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Ruslan Balanukhin (Rationale One)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,7 @@
https://github.com/Ruslan-B/FFmpeg.AutoGen
Version: FFmpeg.AutoGen.Abstractions 8.1.0, FFmpeg.AutoGen.Bindings.DynamicallyLoaded 8.1.0 (NuGet)
Files:
FFmpeg.AutoGen.Abstractions.dll
FFmpeg.AutoGen.Bindings.DynamicallyLoaded.dll
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
@@ -0,0 +1,13 @@
https://ffmpeg.org/
https://github.com/System233/ffmpeg-msvc-prebuilt (Windows builds)
Version: FFmpeg 8.1.3 (shared, GPL)
Files:
avcodec-62.dll
avdevice-62.dll
avfilter-11.dll
avformat-62.dll
avutil-60.dll
swresample-6.dll
swscale-9.dll
+1 -1
View File
@@ -1,6 +1,6 @@
https://github.com/naudio/NAudio
Version: NAudio.Wasapi 2.2.1, NAudio.Core 2.2.1 (NuGet, netstandard2.0)
Version: NAudio.Wasapi 3.3.0, NAudio.Core 3.3.0 (NuGet, net9.0)
Files:
NAudio.Wasapi.dll
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2006-2020 Stefanos Apostolopoulos for the Open Toolkit project.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,9 @@
https://github.com/opentk/opentk
Version: OpenTK.Graphics 4.9.4, OpenTK.Audio.OpenAL 4.9.4, OpenTK.Core 4.9.4, OpenTK.Mathematics 4.9.4 (NuGet, netstandard2.1)
Files:
OpenTK.Graphics.dll
OpenTK.Audio.OpenAL.dll
OpenTK.Core.dll
OpenTK.Mathematics.dll
+3 -2
View File
@@ -1,6 +1,7 @@
The MIT License (MIT)
Copyright (c) 2013 Raffael Herrmann
Copyright (c) 2013-2025 Raffael Herrmann
Copyright (c) 2024-2025 Shane Krueger
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@@ -17,4 +18,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,6 +1,6 @@
https://github.com/codebude/QRCoder/
Version: master 05.08.2014
Version: QRCoder 1.8.1 (NuGet, net6.0)
Files:
QRCoder.dll
QRCoder.dll
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) .NET Foundation and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,7 @@
https://github.com/dotnet/roslyn
Version: Microsoft.CodeAnalysis.CSharp 5.9.0 (NuGet, net10.0)
Files:
Microsoft.CodeAnalysis.dll
Microsoft.CodeAnalysis.CSharp.dll
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 ppy Pty Ltd <contact@ppy.sh>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+17
View File
@@ -0,0 +1,17 @@
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
@@ -0,0 +1,8 @@
https://github.com/libsdl-org/SDL
https://github.com/ppy/SDL3-CS
Version: ppy.SDL3-CS 2026.1002.1 (NuGet, net8.0)
Files:
SDL3-CS.dll
SDL3.dll / libSDL3.so / libSDL3.dylib
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2015-2016 Xamarin, Inc.
Copyright (c) 2017-2018 Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,7 @@
https://github.com/mono/SkiaSharp
Version: SkiaSharp 4.154.0 (NuGet, net10.0)
Files:
SkiaSharp.dll
libSkiaSharp.dll / libSkiaSharp.so / libSkiaSharp.dylib
+1 -1
View File
@@ -1,4 +1,4 @@
Vortice.Direct3D9, Vortice.Mathematics
Vortice.Direct3D11, Vortice.DXGI, Vortice.D3DCompiler, Vortice.DirectX, Vortice.Mathematics
MIT License
Copyright (c) Amer Koleci and Contributors
+6 -3
View File
@@ -2,11 +2,14 @@ https://github.com/amerkoleci/Vortice.Windows
https://github.com/amerkoleci/Vortice.Mathematics
https://github.com/SharpGenTools/SharpGenTools
Version: Vortice.Direct3D9 2.4.2 (NuGet, netstandard2.0), Vortice.Mathematics 1.4.25,
SharpGen.Runtime 2.0.0-beta.13, SharpGen.Runtime.COM 2.0.0-beta.13
Version: Vortice.Direct3D11 3.8.3, Vortice.DXGI 3.8.3, Vortice.D3DCompiler 3.8.3, Vortice.DirectX 3.8.3 (NuGet, net10.0),
Vortice.Mathematics 2.1.0, SharpGen.Runtime 2.4.2-beta, SharpGen.Runtime.COM 2.4.2-beta
Files:
Vortice.Direct3D9.dll
Vortice.Direct3D11.dll
Vortice.DXGI.dll
Vortice.D3DCompiler.dll
Vortice.DirectX.dll
Vortice.Mathematics.dll
SharpGen.Runtime.dll
SharpGen.Runtime.COM.dll
@@ -205,7 +205,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -247,7 +247,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -289,7 +289,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -331,7 +331,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -373,7 +373,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -415,7 +415,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -264,7 +264,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -149,7 +149,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -233,7 +233,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -275,7 +275,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -317,7 +317,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -359,7 +359,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -233,7 +233,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -275,7 +275,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -317,7 +317,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -359,7 +359,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -264,7 +264,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -149,7 +149,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -233,7 +233,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -275,7 +275,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -317,7 +317,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -359,7 +359,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -233,7 +233,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -275,7 +275,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -317,7 +317,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -359,7 +359,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -264,7 +264,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -149,7 +149,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -233,7 +233,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -275,7 +275,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -317,7 +317,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -359,7 +359,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -163,7 +163,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -205,7 +205,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -247,7 +247,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -292,7 +292,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -149,7 +149,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -233,7 +233,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -275,7 +275,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -317,7 +317,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -359,7 +359,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -177,7 +177,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -219,7 +219,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -261,7 +261,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -303,7 +303,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -292,7 +292,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -149,7 +149,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -233,7 +233,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -275,7 +275,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -317,7 +317,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -359,7 +359,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -149,7 +149,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -264,7 +264,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -149,7 +149,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -191,7 +191,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -233,7 +233,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -275,7 +275,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -317,7 +317,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
@@ -359,7 +359,7 @@
<Skin />
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinSelected>OptionsSlideSelected</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
+2 -2
View File
@@ -29,8 +29,8 @@ Supported Operating Systems / Requirements:
- Visual C++ Redistributable Package 2010
Nightly Builds:
- Windows 10 (version 20H2 or later) and Windows 11 with .NET Framework 4.8.1
- Visual C++ Redistributable 2015–2022
- Windows 10 (version 20H2 or later) and Windows 11 with the .NET 10 Runtime and the ASP.NET Core 10 Runtime
- Graphics card with OpenGL 3.3 or Direct3D 11 (feature level 10.0) support
=================================
+15
View File
@@ -0,0 +1,15 @@
<Project>
<Target Name="CopyPartyModeCode" AfterTargets="Build">
<ReadLinesFromFile File="$(MSBuildThisFileDirectory)Excludes.txt">
<Output TaskParameter="Lines" ItemName="PartyModeCodeExclude" />
</ReadLinesFromFile>
<PropertyGroup>
<PartyModeCodeDir>$(MSBuildThisFileDirectory)..\Output\PartyModes\$(TargetName)\Code\</PartyModeCodeDir>
</PropertyGroup>
<ItemGroup>
<PartyModeCode Include="$(ProjectDir)*.cs" Exclude="@(PartyModeCodeExclude->'$(ProjectDir)%(Identity)')" />
</ItemGroup>
<RemoveDir Directories="$(PartyModeCodeDir)" />
<Copy SourceFiles="@(PartyModeCode)" DestinationFolder="$(PartyModeCodeDir)" />
</Target>
</Project>
@@ -16,7 +16,6 @@
#endregion
using System;
using System.Windows.Forms;
namespace VocaluxeLib.PartyModes.Challenge
{
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.Challenge
@@ -1,127 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">DebugWin</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5A4053F1-5AD5-441F-B254-D97A088127B6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.Challenge</RootNamespace>
<AssemblyName>Challenge</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>WIN</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>LINUX</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'InstallerWin|AnyCPU'">
<OutputPath>bin</OutputPath>
<DefineConstants>WIN</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="CChallengeRounds.cs" />
<Compile Include="CPartyScreenChallengeSongs.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="CPartyModeChallenge.cs" />
<Compile Include="CPartyScreenChallengeConfig.cs" />
<Compile Include="CPartyScreenChallengeMain.cs" />
<Compile Include="CPartyScreenChallengeNames.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">rm -rf "$(SolutionDir)Output\PartyModes\$(TargetName)\Code"
mkdir -p "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
cp -R $(ProjectDir)*.cs "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
rm -f "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\GlobalSuppressions.cs"
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
@@ -16,7 +16,6 @@
#endregion
using System;
using System.Windows.Forms;
namespace VocaluxeLib.PartyModes.PartnerSwap
{
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.PartnerSwap
@@ -1,118 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">DebugWin</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9D4F1C27-3B8E-4A62-B5D0-7E1A2C6F9B53}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.PartnerSwap</RootNamespace>
<AssemblyName>PartnerSwap</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>WIN</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>LINUX</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'InstallerWin|AnyCPU'">
<OutputPath>bin</OutputPath>
<DefineConstants>WIN</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="CPartyModePartnerSwap.cs" />
<Compile Include="CPartyScreenPartnerSwapConfig.cs" />
<Compile Include="CPartyScreenPartnerSwapMain.cs" />
<Compile Include="CPartyScreenPartnerSwapNames.cs" />
<Compile Include="CPartyScreenPartnerSwapSongs.cs" />
<Compile Include="GlobalSuppressions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">rm -rf "$(SolutionDir)Output\PartyModes\$(TargetName)\Code"
mkdir -p "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
cp -R $(ProjectDir)*.cs "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
rm -f "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\GlobalSuppressions.cs"
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
@@ -15,7 +15,6 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Windows.Forms;
namespace VocaluxeLib.PartyModes.RuleRoulette
{
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.RuleRoulette
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.RuleRoulette
@@ -1,119 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">DebugWin</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2E6A9B48-71C3-4D05-8F2B-C4A7D19E6E3F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.RuleRoulette</RootNamespace>
<AssemblyName>RuleRoulette</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>WIN</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>LINUX</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'InstallerWin|AnyCPU'">
<OutputPath>bin</OutputPath>
<DefineConstants>WIN</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="CPartyModeRuleRoulette.cs" />
<Compile Include="CPartyScreenRuleRouletteConfig.cs" />
<Compile Include="CPartyScreenRuleRouletteMain.cs" />
<Compile Include="CPartyScreenRuleRouletteNames.cs" />
<Compile Include="CPartyScreenRuleRouletteRules.cs" />
<Compile Include="CPartyScreenRuleRouletteSongs.cs" />
<Compile Include="GlobalSuppressions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">rm -rf "$(SolutionDir)Output\PartyModes\$(TargetName)\Code"
mkdir -p "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
cp -R $(ProjectDir)*.cs "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
rm -f "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\GlobalSuppressions.cs"
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
@@ -15,7 +15,6 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Windows.Forms;
namespace VocaluxeLib.PartyModes.TeamSurvival
{
@@ -17,7 +17,6 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.TeamSurvival
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.TeamSurvival
@@ -1,119 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">DebugWin</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7B2E4A19-5C3D-4E8F-A16B-2D9C0F3E8B41}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.TeamSurvival</RootNamespace>
<AssemblyName>TeamSurvival</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>WIN</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>LINUX</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'InstallerWin|AnyCPU'">
<OutputPath>bin</OutputPath>
<DefineConstants>WIN</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="CPartyModeTeamSurvival.cs" />
<Compile Include="CPartyScreenTeamSurvivalConfig.cs" />
<Compile Include="CPartyScreenTeamSurvivalHearts.cs" />
<Compile Include="CPartyScreenTeamSurvivalMain.cs" />
<Compile Include="CPartyScreenTeamSurvivalNames.cs" />
<Compile Include="CPartyScreenTeamSurvivalSongs.cs" />
<Compile Include="GlobalSuppressions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">rm -rf "$(SolutionDir)Output\PartyModes\$(TargetName)\Code"
mkdir -p "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
cp -R $(ProjectDir)*.cs "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
rm -f "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\GlobalSuppressions.cs"
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
@@ -17,7 +17,6 @@
using System;
using System.Diagnostics;
using System.Windows.Forms;
namespace VocaluxeLib.PartyModes.TicTacToe
{
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.TicTacToe
@@ -1,127 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">DebugWin</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6F3E1874-F28A-40E9-AFBD-31934D593679}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.TicTacToe</RootNamespace>
<AssemblyName>TicTacToe</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>WIN</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>LINUX</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'InstallerWin|AnyCPU'">
<OutputPath>bin</OutputPath>
<DefineConstants>WIN</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="CPartyScreenTicTacToeSongs.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="CPartyModeTicTacToe.cs" />
<Compile Include="CPartyScreenTicTacToeConfig.cs" />
<Compile Include="CPartyScreenTicTacToeMain.cs" />
<Compile Include="CPartyScreenTicTacToeNames.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">rm -rf "$(SolutionDir)Output\PartyModes\$(TargetName)\Code"
mkdir -p "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
cp -R $(ProjectDir)*.cs "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
rm -f "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\GlobalSuppressions.cs"
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
@@ -15,7 +15,6 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Windows.Forms;
namespace VocaluxeLib.PartyModes.Tournament
{
@@ -18,7 +18,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using VocaluxeLib.Menu;
namespace VocaluxeLib.PartyModes.Tournament
@@ -1,118 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">DebugWin</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{3C7D2E51-8A64-4F0B-9E2A-6B1D4C8F7A20}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VocaluxeLib.PartyModes.Tournament</RootNamespace>
<AssemblyName>Tournament</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;WIN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>WIN</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</OutputPath>
<DefineConstants>TRACE;DEBUG;LINUX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseLinux|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<DefineConstants>LINUX</DefineConstants>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'InstallerWin|AnyCPU'">
<OutputPath>bin</OutputPath>
<DefineConstants>WIN</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="CPartyModeTournament.cs" />
<Compile Include="CPartyScreenTournamentConfig.cs" />
<Compile Include="CPartyScreenTournamentMain.cs" />
<Compile Include="CPartyScreenTournamentNames.cs" />
<Compile Include="CPartyScreenTournamentSongs.cs" />
<Compile Include="GlobalSuppressions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">if exist "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" rd "$(SolutionDir)Output\PartyModes\$(TargetName)\Code" /S /Q
cd $(SolutionDir)Partymodes\
xcopy "$(ProjectDir)*.cs" "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\" /EXCLUDE:Excludes.txt /I /Y</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">rm -rf "$(SolutionDir)Output\PartyModes\$(TargetName)\Code"
mkdir -p "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
cp -R $(ProjectDir)*.cs "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\"
rm -f "$(SolutionDir)Output\PartyModes\$(TargetName)\Code\GlobalSuppressions.cs"
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
+1 -1
View File
@@ -4,7 +4,7 @@
#include "ptAKF.h"
#include "dywapitchtrack/ptDyWa.h"
#ifdef __linux__
#if defined(__linux__) || defined(__APPLE__)
#define DllExport extern "C"
#else
#define DllExport extern "C" __declspec(dllexport)
+6 -1
View File
@@ -12,9 +12,14 @@ objects = \
CPPFLAGS = -std=gnu++11 -fPIC
PitchTracker: $(objects)
ifeq ($(shell uname),Darwin)
$(CXX) -shared -o libPitchTracker.dylib -fPIC $(objects)
cp libPitchTracker.dylib ../Output/
else
gcc -shared -o libPitchTracker.dll.so -fPIC $(objects)
strip libPitchTracker.dll.so
cp libPitchTracker.dll.so ../Output/
endif
clean:
rm -f ../Output/libPitchTracker.dll.so libPitchTracker.dll.so $(objects)
rm -f ../Output/libPitchTracker.dll.so libPitchTracker.dll.so ../Output/libPitchTracker.dylib libPitchTracker.dylib $(objects)
+1 -1
View File
@@ -22,7 +22,7 @@ namespace da {
constexpr sample_t max_s16(32767), min_s16 = -max_s16 - sample_t(1);
constexpr sample_t max_s24(8388607), min_s24 = -max_s24 - sample_t(1);
constexpr sample_t max_s32(2147483647), min_s32= -max_s32 - sample_t(1);
constexpr sample_t max_s32(2147483647.0f), min_s32= -max_s32 - sample_t(1);
constexpr double tau(6.2831853071795864769252867665590057683943387987502116); ///< One full circle
constexpr double pi = tau / sample_t(2); ///< Half circle
constexpr double eps(1e-10); ///< Tiny positive value
+2 -2
View File
@@ -25,8 +25,8 @@ Supported Operating Systems / Requirements:
- Visual C++ Redistributable Package 2010
Nightly Builds:
- Windows 10 (version 20H2 or later) and Windows 11 with .NET Framework 4.8.1
- Visual C++ Redistributable 2015–2022
- Windows 10 (version 20H2 or later) and Windows 11 with the .NET 10 Runtime and the ASP.NET Core 10 Runtime
- Graphics card with OpenGL 3.3 or Direct3D 11 (feature level 10.0) support
## 2. Download
+20 -116
View File
@@ -1,132 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{8EDF4429-251A-416D-BB68-93F227191BCF}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>9.0</LangVersion>
<Platforms>x86;x64</Platforms>
<OutputPath>bin\$(Configuration)\</OutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageReference Include="NUnit" Version="4.6.1" />
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" PrivateAssets="all" />
<PackageReference Include="NUnit3TestAdapter" Version="6.3.1" PrivateAssets="all" />
<PackageReference Include="NunitXml.TestLogger" Version="8.1.0" />
<PackageReference Include="coverlet.collector" Version="10.1.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Compile Include="PartyModeChallenge\CPartyModeChallangeTest.cs" />
<Content Include="VocaluxeLib\Log\CLogTest.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>CLogTest.cs</LastGenOutput>
</Content>
<Compile Include="VocaluxeLib\Log\CBenchmarkTest.cs" />
<Compile Include="VocaluxeLib\Log\CLogTest.cs">
<Compile Update="VocaluxeLib\Log\CLogTest.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>CLogTest.tt</DependentUpon>
</Compile>
<Compile Include="VocaluxeLib\Log\Rolling\CLogFileRollerTest.cs" />
<Compile Include="VocaluxeLib\Utils\Combinatorics\CCombinationsTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VocaluxeLib\XML\CXmlSerializerTest.cs" />
<Compile Include="VocaluxeWeb\CPinHasherTest.cs" />
<Compile Include="VocaluxeWeb\CQueueServiceTest.cs" />
<Compile Include="VocaluxeWeb\CUserAgentTest.cs" />
<Compile Include="VocaluxeWeb\CWebSettingsTest.cs" />
<None Update="VocaluxeLib\Log\CLogTest.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>CLogTest.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
<ProjectReference Include="..\PartyModes\PartyModeChallenge\PartyModeChallenge.csproj" SetPlatform="Platform=AnyCPU" />
<ProjectReference Include="..\VocaluxeLib\VocaluxeLib.csproj" SetPlatform="Platform=AnyCPU" />
<ProjectReference Include="..\Vocaluxe\Vocaluxe.csproj" />
<ProjectReference Include="..\VocaluxeWeb\VocaluxeWeb.csproj" SetPlatform="Platform=AnyCPU" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PartyModes\PartyModeChallenge\PartyModeChallenge.csproj">
<Project>{5a4053f1-5ad5-441f-b254-d97a088127b6}</Project>
<Name>PartyModeChallenge</Name>
</ProjectReference>
<ProjectReference Include="..\VocaluxeLib\VocaluxeLib.csproj">
<Project>{D2B6DDEF-E0E1-4DDF-A73A-E6ACEF5C95EC}</Project>
<Name>VocaluxeLib</Name>
</ProjectReference>
<ProjectReference Include="..\Vocaluxe\Vocaluxe.csproj">
<Project>{2a1e0f2d-5392-4bb7-b0a1-a9dfa13e79ff}</Project>
<Name>Vocaluxe</Name>
</ProjectReference>
<ProjectReference Include="..\VocaluxeWeb\VocaluxeWeb.csproj">
<Project>{4E2C9A71-6B3D-4F85-9C1E-8A7D5B2F3C60}</Project>
<Name>VocaluxeWeb</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="VocaluxeLib\XML\TestFiles\Dictionary`2.xml" />
<Content Include="VocaluxeLib\XML\TestFiles\SConfig.xml" />
<Content Include="VocaluxeLib\XML\TestFiles\SDefaultFonts.xml" />
<Content Include="VocaluxeLib\XML\TestFiles\SSkin.xml" />
<Content Include="VocaluxeLib\XML\TestFiles\STheme.xml" />
<Content Include="VocaluxeLib\XML\TestFiles\SThemeCover.xml" />
<Content Include="VocaluxeLib\XML\TestFiles\SThemeScreen.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
@@ -91,6 +91,10 @@
<VideoPreview>TR_CONFIG_ON</VideoPreview>
<VideosInSongs>TR_CONFIG_ON</VideosInSongs>
<VideosToBackground>TR_CONFIG_OFF</VideosToBackground>
<HardwareDecoding>TR_CONFIG_ON</HardwareDecoding>
<GpuColorConversion>TR_CONFIG_ON</GpuColorConversion>
<DecoderThreads>0</DecoderThreads>
<VideoDownscaleResolution>TR_CONFIG_SCALING_DISABLED</VideoDownscaleResolution>
<WebcamLib>AForgeNet</WebcamLib>
<WebcamConfig />
</Video>
-18
View File
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Serilog" publicKeyToken="24c2f752a8e58a10" culture="neutral" />
<bindingRedirect oldVersion="4.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Serilog.Enrichers.Thread" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+20 -20
View File
@@ -208,26 +208,26 @@ Global
{54A48AF7-515C-4EDD-B395-2BFFA096050A}.ReleaseWin|x64.Build.0 = Release|x64
{54A48AF7-515C-4EDD-B395-2BFFA096050A}.ReleaseWin|x86.ActiveCfg = Release|Win32
{54A48AF7-515C-4EDD-B395-2BFFA096050A}.ReleaseWin|x86.Build.0 = Release|Win32
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugLinux|x64.ActiveCfg = Debug|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugLinux|x64.Build.0 = Debug|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugLinux|x86.ActiveCfg = Debug|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugLinux|x86.Build.0 = Debug|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugWin|x64.ActiveCfg = Debug|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugWin|x64.Build.0 = Debug|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugWin|x86.ActiveCfg = Debug|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugWin|x86.Build.0 = Debug|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.InstallerWin|x64.ActiveCfg = Release|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.InstallerWin|x64.Build.0 = Release|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.InstallerWin|x86.ActiveCfg = Release|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.InstallerWin|x86.Build.0 = Release|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseLinux|x64.ActiveCfg = Release|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseLinux|x64.Build.0 = Release|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseLinux|x86.ActiveCfg = Release|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseLinux|x86.Build.0 = Release|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseWin|x64.ActiveCfg = Release|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseWin|x64.Build.0 = Release|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseWin|x86.ActiveCfg = Release|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseWin|x86.Build.0 = Release|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugLinux|x64.ActiveCfg = DebugLinux|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugLinux|x64.Build.0 = DebugLinux|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugLinux|x86.ActiveCfg = DebugLinux|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugLinux|x86.Build.0 = DebugLinux|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugWin|x64.ActiveCfg = DebugWin|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugWin|x64.Build.0 = DebugWin|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugWin|x86.ActiveCfg = DebugWin|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.DebugWin|x86.Build.0 = DebugWin|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.InstallerWin|x64.ActiveCfg = InstallerWin|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.InstallerWin|x64.Build.0 = InstallerWin|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.InstallerWin|x86.ActiveCfg = InstallerWin|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.InstallerWin|x86.Build.0 = InstallerWin|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseLinux|x64.ActiveCfg = ReleaseLinux|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseLinux|x64.Build.0 = ReleaseLinux|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseLinux|x86.ActiveCfg = ReleaseLinux|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseLinux|x86.Build.0 = ReleaseLinux|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseWin|x64.ActiveCfg = ReleaseWin|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseWin|x64.Build.0 = ReleaseWin|x64
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseWin|x86.ActiveCfg = ReleaseWin|x86
{8EDF4429-251A-416D-BB68-93F227191BCF}.ReleaseWin|x86.Build.0 = ReleaseWin|x86
{7B2E4A19-5C3D-4E8F-A16B-2D9C0F3E8B41}.DebugLinux|x64.ActiveCfg = DebugLinux|Any CPU
{7B2E4A19-5C3D-4E8F-A16B-2D9C0F3E8B41}.DebugLinux|x64.Build.0 = DebugLinux|Any CPU
{7B2E4A19-5C3D-4E8F-A16B-2D9C0F3E8B41}.DebugLinux|x86.ActiveCfg = DebugLinux|Any CPU
+1 -1
View File
@@ -316,7 +316,7 @@ namespace Vocaluxe.Base
// Recheck the condition as it cloud have change before we got the lock
if (_PreviewStartHelperTask != null && (_PreviewPlayer.Length > 0 || _PreviewStartWaitCounter++ >= _PreviewStartWaitMaxTries))
{
_PreviewStartHelperTask.RunSynchronously(TaskScheduler.FromCurrentSynchronizationContext());
_PreviewStartHelperTask.RunSynchronously();
_PreviewStartHelperTask = null;
_PreviewStartWaitCounter = 0;
}
+20 -4
View File
@@ -21,8 +21,8 @@ using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Xml.Serialization;
using Vocaluxe.Lib;
using Vocaluxe.Lib.Sound.Record;
using Vocaluxe.Lib.Webcam;
using VocaluxeLib;
@@ -218,6 +218,14 @@ namespace Vocaluxe.Base
public EOffOn VideosInSongs;
[DefaultValue(EOffOn.TR_CONFIG_OFF)]
public EOffOn VideosToBackground;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
public EOffOn HardwareDecoding;
[DefaultValue(EOffOn.TR_CONFIG_ON)]
public EOffOn GpuColorConversion;
[XmlRanged(0, 64), DefaultValue(0)]
public int DecoderThreads;
[DefaultValue(EVideoDownscaleResolution.TR_CONFIG_SCALING_DISABLED)]
public EVideoDownscaleResolution VideoDownscaleResolution;
[DefaultValue(EWebcamLib.AForgeNet)]
public EWebcamLib WebcamLib;
public SWebcamConfig? WebcamConfig;
@@ -268,7 +276,7 @@ namespace Vocaluxe.Base
{
#if INSTALLER
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs),
Path.Combine(CSettings.ProgramFolder, FolderNameSongs)
Path.Combine(CSettings.ProgramFolder, CSettings.FolderNameSongs)
#elif WIN
Path.Combine(CSettings.ProgramFolder, CSettings.FolderNameSongs)
#elif LINUX
@@ -483,8 +491,8 @@ namespace Vocaluxe.Base
Platform = Environment.OSVersion.Platform.ToString(),
OSVersion = Environment.OSVersion.ToString(),
ProcessorCount = Environment.ProcessorCount,
Screens = Screen.AllScreens.Length,
PrimaryScreenResolution = Screen.PrimaryScreen.Bounds.Size.ToString(),
Screens = CSdl.GetDisplayCount(),
PrimaryScreenResolution = CSdl.GetPrimaryDisplaySize().ToString(),
Directory = CSettings.ProgramFolder
};
}
@@ -614,6 +622,14 @@ namespace Vocaluxe.Base
return "Show Videos while singing: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)));
case "VideosToBackground":
return "Show backgroundmusic videos as background: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)));
case "HardwareDecoding":
return "Decode videos on the graphics card if supported, falls back to software decoding: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)));
case "GpuColorConversion":
return "Upload videos as YUV and convert them to RGB on the graphics card (Direct3D/OpenGL): " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn)));
case "DecoderThreads":
return "Number of threads used for decoding a video, 0 = automatic (all cores) [0..64]";
case "VideoDownscaleResolution":
return "The resolution to which you want to downscale videos: " + CHelper.ListStrings(Enum.GetNames(typeof(EVideoDownscaleResolution)));
case "WebcamLib":
return "WebcamLib: " + CHelper.ListStrings(Enum.GetNames(typeof(EWebcamLib)));
case "MicDelay":
+6 -3
View File
@@ -19,13 +19,13 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using SkiaSharp;
using VocaluxeLib;
using VocaluxeLib.Draw;
using VocaluxeLib.Log;
@@ -391,7 +391,7 @@ namespace Vocaluxe.Base
}
}
private static void _TrySaveCachedCover(string text, ECoverGeneratorType type, CSong firstSong, Bitmap bmp)
private static void _TrySaveCachedCover(string text, ECoverGeneratorType type, CSong firstSong, SKBitmap bmp)
{
try
{
@@ -404,7 +404,10 @@ namespace Vocaluxe.Base
Directory.CreateDirectory(cacheFolder);
var tmpPath = cachePath + ".tmp";
bmp.Save(tmpPath, ImageFormat.Png);
using (var stream = File.Create(tmpPath))
{
bmp.Encode(stream, SKEncodedImageFormat.Png, 100);
}
if (File.Exists(cachePath))
File.Delete(cachePath);
+86 -56
View File
@@ -19,11 +19,9 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.IO;
using System.Linq;
using SkiaSharp;
using Vocaluxe.Base.Fonts;
using VocaluxeLib;
@@ -75,8 +73,7 @@ namespace Vocaluxe.Base
{
public readonly string Text;
public float Width, Height;
private readonly Graphics _Graphics;
private readonly Font _Font;
private readonly SKFont _Font;
private float _WidthTrimmed = -1;
public float WidthTrimmed
{
@@ -85,7 +82,7 @@ namespace Vocaluxe.Base
if (_WidthTrimmed < 0f)
{
var text = Text.TrimEnd(null);
_WidthTrimmed = text.Length == Text.Length ? Width : _Graphics.MeasureString(text, _Font).Width;
_WidthTrimmed = text.Length == Text.Length ? Width : _MeasureString(text, _Font).Width;
}
return _WidthTrimmed;
@@ -93,13 +90,12 @@ namespace Vocaluxe.Base
}
public int Line;
public CTextElement(string text, Graphics g, Font font)
public CTextElement(string text, SKFont font)
{
Text = text;
var dimensions = g.MeasureString(text, font);
var dimensions = _MeasureString(text, font);
Width = dimensions.Width;
Height = (dimensions.Height + font.Height) / 2;
_Graphics = g;
Height = (dimensions.Height + (float)Math.Ceiling(font.Spacing)) / 2;
_Font = font;
}
@@ -111,44 +107,67 @@ namespace Vocaluxe.Base
}
}
private void _DrawBackground(Graphics g, Bitmap bmpBackground, String firstCoverPath)
private static SizeF _MeasureString(string text, SKFont font)
{
g.Clear(_BGColor.AsColor());
ImageAttributes ia = null;
if (_Theme.ShowFirstCover && !string.IsNullOrEmpty(firstCoverPath) && File.Exists(firstCoverPath))
{
using (var bmp2 = new Bitmap(firstCoverPath))
{
g.DrawImage(bmp2, bmpBackground.GetRect(), 0, 0, bmp2.Width, bmp2.Height, GraphicsUnit.Pixel);
}
var cm = new ColorMatrix { Matrix33 = _Theme.ImageAlpha };
ia = new ImageAttributes();
ia.SetColorMatrix(cm);
}
g.DrawImage(bmpBackground, bmpBackground.GetRect(), 0, 0, bmpBackground.Width, bmpBackground.Height, GraphicsUnit.Pixel, ia);
return new SizeF(font.MeasureText(text.TrimEnd(' ')) + font.Size / 3, font.Spacing);
}
private void _DrawText(Graphics g, Size bmpSize, CFont font, List<CTextElement> elements)
private static SKColor _ToSKColor(SColorF color)
{
var fo = CFonts.GetSystemFont(font);
var c = color.AsColor();
return new SKColor(c.R, c.G, c.B, c.A);
}
private void _DrawBackground(SKCanvas g, SKBitmap bmpBackground, String firstCoverPath)
{
g.Clear(_ToSKColor(_BGColor));
var rect = new SKRect(0, 0, bmpBackground.Width, bmpBackground.Height);
var alpha = 1f;
if (_Theme.ShowFirstCover && !string.IsNullOrEmpty(firstCoverPath) && File.Exists(firstCoverPath))
{
using (var bmp2 = SKBitmap.Decode(firstCoverPath))
using (var image2 = bmp2 == null ? null : SKImage.FromBitmap(bmp2))
{
if (image2 != null)
{
g.DrawImage(image2, rect, new SKSamplingOptions(SKCubicResampler.Mitchell));
}
}
alpha = _Theme.ImageAlpha;
}
using (var image = SKImage.FromBitmap(bmpBackground))
using (var paint = new SKPaint { Color = SKColors.White.WithAlpha((byte)Math.Round(alpha.Clamp(0f, 1f) * 255)) })
{
g.DrawImage(image, rect, new SKSamplingOptions(SKCubicResampler.Mitchell), paint);
}
}
private void _DrawText(SKCanvas g, Size bmpSize, CFont font, List<CTextElement> elements)
{
var typeface = CFonts.GetTypeface(font);
var maxHeight = elements.Select(el => el.Height).Max();
var lineCount = elements.Last().Line + 1;
//Have to use size in em not pixels!
var emSize = fo.Size * fo.FontFamily.GetCellAscent(fo.Style) / fo.FontFamily.GetEmHeight(fo.Style);
float emSize;
using (var fo = new SKFont(typeface, font.Height))
{
//Have to use size in em not pixels!
emSize = -fo.Metrics.Ascent;
}
var outlineSize = CFonts.GetOutlineSize(font) * font.Height;
var outlineColorF = CFonts.GetOutlineColor(font);
outlineColorF.A = outlineColorF.A * _TextColor.A;
using (var path = new GraphicsPath())
using (var pen = new Pen(outlineColorF.AsColor(), outlineSize / 2))
var paths = new List<SKPath>();
using (var fo = new SKFont(typeface, emSize) { Edging = SKFontEdging.Antialias, Subpixel = true })
using (var pen = new SKPaint { Style = SKPaintStyle.Stroke, StrokeWidth = outlineSize / 2, StrokeJoin = SKStrokeJoin.Round, IsAntialias = true, Color = _ToSKColor(outlineColorF) })
using (var brush = new SKPaint { Style = SKPaintStyle.Fill, IsAntialias = true, Color = _ToSKColor(_TextColor) })
{
pen.LineJoin = LineJoin.Round;
pen.Alignment = PenAlignment.Outset;
var top = (bmpSize.Height - _MarginBottom - _MarginTop - maxHeight * lineCount) / 2 + _MarginTop;
var nextLineEl = 0;
for (var i = 0; i < lineCount; i++)
@@ -181,17 +200,25 @@ namespace Vocaluxe.Base
left = _MarginLeft;
}
//g.DrawString(line, fo, new SolidBrush(_TextColor.AsColor()), left, top, StringFormat.GenericTypographic);
path.AddString(line, fo.FontFamily, (int)fo.Style, emSize, new PointF(left, top), StringFormat.GenericTypographic);
paths.Add(fo.GetTextPath(line, new SKPoint(left, top - fo.Metrics.Ascent)));
top += maxHeight + _LineSpace;
}
g.DrawPath(pen, path);
g.FillPath(new SolidBrush(_TextColor.AsColor()), path);
foreach (var path in paths)
{
g.DrawPath(path, pen);
}
foreach (var path in paths)
{
g.DrawPath(path, brush);
path.Dispose();
}
}
}
public Bitmap GetCover(string text, string firstCoverPath)
public SKBitmap GetCover(string text, string firstCoverPath)
{
if (!_Valid)
{
@@ -199,33 +226,36 @@ namespace Vocaluxe.Base
}
text = CLanguage.Translate(_Theme.Text.Text.Replace("%TEXT%", text));
using (var bmpImage = new Bitmap(_Image))
using (var bmpImage = SKBitmap.Decode(_Image))
{
var bmp = new Bitmap(bmpImage.Width, bmpImage.Height, PixelFormat.Format32bppArgb);
if (bmpImage == null)
{
return null;
}
var bmp = new SKBitmap(bmpImage.Width, bmpImage.Height, SKColorType.Bgra8888, SKAlphaType.Premul);
try
{
using (var g = Graphics.FromImage(bmp))
using (var g = new SKCanvas(bmp))
{
g.SmoothingMode = SmoothingMode.AntiAlias;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.TextRenderingHint = TextRenderingHint.AntiAlias;
_DrawBackground(g, bmpImage, firstCoverPath);
if (text != "")
{
var font = new CFont(_Theme.Text.Font);
var fo = CFonts.GetSystemFont(font);
var textParts = _SplitText(text);
var elements = textParts.Select(line => new CTextElement(line, g, fo)).ToList();
var factor = _DistributeText(elements, bmp.Width, bmp.Height);
foreach (var element in elements)
using (var fo = new SKFont(CFonts.GetTypeface(font), font.Height))
{
element.AdjustSize(factor);
}
var textParts = _SplitText(text);
var elements = textParts.Select(line => new CTextElement(line, fo)).ToList();
var factor = _DistributeText(elements, bmp.Width, bmp.Height);
foreach (var element in elements)
{
element.AdjustSize(factor);
}
font.Height *= factor / (1f + CFonts.GetOutlineSize(font)); //Adjust for outline size
_DrawText(g, bmp.GetSize(), font, elements);
font.Height *= factor / (1f + CFonts.GetOutlineSize(font)); //Adjust for outline size
_DrawText(g, bmp.GetSize(), font, elements);
}
}
}
+17 -6
View File
@@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using SkiaSharp;
using Vocaluxe.Lib.Draw;
using VocaluxeLib;
using VocaluxeLib.Draw;
@@ -101,7 +102,7 @@ namespace Vocaluxe.Base
switch (CConfig.Config.Graphics.Renderer)
{
case ERenderer.TR_CONFIG_SOFTWARE:
_Draw = new CDrawWinForm();
_Draw = new CDrawSoftware();
break;
case ERenderer.TR_CONFIG_OPENGL:
@@ -133,7 +134,7 @@ namespace Vocaluxe.Base
#endif
default:
_Draw = new CDrawWinForm();
_Draw = new CDrawSoftware();
break;
}
@@ -213,7 +214,7 @@ namespace Vocaluxe.Base
/// </summary>
/// <param name="bitmap"></param>
/// <returns>Reference to texture</returns>
public static CTextureRef AddTexture(Bitmap bitmap)
public static CTextureRef AddTexture(SKBitmap bitmap)
{
return _Draw.AddTexture(bitmap);
}
@@ -261,7 +262,7 @@ namespace Vocaluxe.Base
/// </summary>
/// <param name="bmp">Bitmap to add, gets disposed after adding!</param>
/// <returns>Reference to texture</returns>
public static CTextureRef EnqueueTexture(Bitmap bmp)
public static CTextureRef EnqueueTexture(SKBitmap bmp)
{
return _Draw.EnqueueTexture(bmp);
}
@@ -284,7 +285,7 @@ namespace Vocaluxe.Base
/// </summary>
/// <param name="textureRef">Reference to the texture to update</param>
/// <param name="bmp"></param>
public static void EnqueueTextureUpdate(CTextureRef textureRef, Bitmap bmp)
public static void EnqueueTextureUpdate(CTextureRef textureRef, SKBitmap bmp)
{
_Draw.EnqueueTextureUpdate(textureRef, bmp);
}
@@ -312,12 +313,22 @@ namespace Vocaluxe.Base
_Draw.UpdateTexture(textureRef, w, h, data);
}
public static bool SupportsYuvVideo
{
get { return _Draw != null && _Draw.SupportsYuvVideo; }
}
public static void UpdateYuvTexture(ref CTextureRef textureRef, int w, int h, byte[] data, float[] yuvToRgbRows)
{
_Draw.UpdateYuvTexture(ref textureRef, w, h, data, yuvToRgbRows);
}
/// <summary>
/// Updates a texture, filling it with the new data from the bitmap
/// </summary>
/// <param name="textureRef"></param>
/// <param name="bmp"></param>
public static void UpdateTexture(CTextureRef textureRef, Bitmap bmp)
public static void UpdateTexture(CTextureRef textureRef, SKBitmap bmp)
{
_Draw.UpdateTexture(textureRef, bmp);
}
-1
View File
@@ -19,7 +19,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using Vocaluxe.Base.Fonts;
using Vocaluxe.Base.ThemeSystem;
using Vocaluxe.Screens;
+67 -19
View File
@@ -16,14 +16,17 @@
#endregion
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.PortableExecutable;
using System.Security.Cryptography;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Emit;
using Vocaluxe.Base.ThemeSystem;
using VocaluxeLib;
using VocaluxeLib.Log;
@@ -387,32 +390,36 @@ namespace Vocaluxe.Base
private static Assembly _CompileFiles(string[] files, string outputPath)
{
var compilerParams = new CompilerParameters();
SyntaxTree[] syntaxTrees;
compilerParams.ReferencedAssemblies.Add("System.Windows.Forms.dll");
compilerParams.ReferencedAssemblies.Add("System.dll");
compilerParams.ReferencedAssemblies.Add("System.Core.dll");
compilerParams.ReferencedAssemblies.Add(Path.Combine("libs", "managed", "VocaluxeLib.dll"));
if (outputPath == null)
try
{
compilerParams.GenerateInMemory = true;
syntaxTrees = files.Select(f => CSharpSyntaxTree.ParseText(File.ReadAllText(f), path: f, encoding: Encoding.UTF8)).ToArray();
}
else
catch (Exception e)
{
compilerParams.GenerateInMemory = false;
compilerParams.OutputAssembly = outputPath;
CLog.Error("Error Compiling Source (" + CHelper.ListStrings(files) + "): " + e.Message);
return null;
}
var assemblyName = outputPath == null ? "PartyMode_" + Guid.NewGuid().ToString("N") : Path.GetFileNameWithoutExtension(outputPath);
#if DEBUG
compilerParams.IncludeDebugInformation = true;
var optimization = OptimizationLevel.Debug;
var emitOptions = new EmitOptions(debugInformationFormat: DebugInformationFormat.Embedded);
#else
var optimization = OptimizationLevel.Release;
var emitOptions = new EmitOptions();
#endif
var compilation = CSharpCompilation.Create(assemblyName, syntaxTrees, _GetCompilerReferences(),
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, optimizationLevel: optimization));
using (var cdp = CodeDomProvider.CreateProvider("CSharp"))
using (var peStream = new MemoryStream())
{
CompilerResults compileResult;
EmitResult compileResult;
try
{
compileResult = cdp.CompileAssemblyFromFile(compilerParams, files);
compileResult = compilation.Emit(peStream, options: emitOptions);
}
catch (Exception e)
{
@@ -420,11 +427,13 @@ namespace Vocaluxe.Base
return null;
}
if (compileResult.Errors.Count > 0)
if (!compileResult.Success)
{
foreach (CompilerError e in compileResult.Errors)
foreach (var e in compileResult.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error))
{
CLog.Error("Error Compiling Source (" + CHelper.ListStrings(files) + "): " + e.ErrorText + " in '" + e.FileName + "' (" + e.Line + ")");
var position = e.Location.GetLineSpan();
CLog.Error("Error Compiling Source (" + CHelper.ListStrings(files) + "): " + e.GetMessage() + " in '" + position.Path + "' (" +
(position.StartLinePosition.Line + 1) + ")");
}
return null;
@@ -432,11 +441,12 @@ namespace Vocaluxe.Base
if (outputPath == null)
{
return compileResult.CompiledAssembly;
return Assembly.Load(peStream.ToArray());
}
try
{
File.WriteAllBytes(outputPath, peStream.ToArray());
return Assembly.LoadFrom(outputPath);
}
catch (Exception e)
@@ -447,6 +457,44 @@ namespace Vocaluxe.Base
}
}
private static IEnumerable<MetadataReference> _GetCompilerReferences()
{
var paths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
var platformAssemblies = AppContext.GetData("TRUSTED_PLATFORM_ASSEMBLIES") as string;
if (platformAssemblies != null)
{
foreach (var path in platformAssemblies.Split(new[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries))
{
paths[Path.GetFileName(path)] = path;
}
}
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic && !string.IsNullOrEmpty(a.Location)))
{
paths[Path.GetFileName(assembly.Location)] = assembly.Location;
}
paths[Path.GetFileName(typeof(IPartyMode).Assembly.Location)] = typeof(IPartyMode).Assembly.Location;
return paths.Values.Where(_HasMetadata).Select(p => MetadataReference.CreateFromFile(p));
}
private static bool _HasMetadata(string path)
{
try
{
using (var stream = File.OpenRead(path))
using (var reader = new PEReader(stream))
{
return reader.HasMetadata;
}
}
catch (Exception)
{
return false;
}
}
private static CMenuParty _GetPartyScreenInstance(Assembly assembly, string screenName, string partyModeName)
{
if (assembly == null)
+1 -1
View File
@@ -259,7 +259,7 @@ namespace Vocaluxe.Base
try
{
StreamReader sr;
using (sr = new StreamReader(file, Encoding.Default, true))
using (sr = new StreamReader(file, CEncoding.Locale, true))
{
string line;
while ((line = sr.ReadLine()) != null)
+2 -3
View File
@@ -20,7 +20,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
using VocaluxeLib;
using VocaluxeLib.Log;
@@ -205,12 +204,12 @@ namespace Vocaluxe.Base
public static string Version
{
get { return Application.ProductVersion.Split('-').First(); }
get { return FullVersion.Split('-').First(); }
}
public static string FullVersion
{
get { return Application.ProductVersion; }
get { return Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion; }
}
public static string GetFullVersionText()
+30 -36
View File
@@ -18,11 +18,18 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using VocaluxeLib;
namespace Vocaluxe.Base
{
enum EMouseButton
{
None,
Left,
Right,
Middle
}
static class CTime
{
private static readonly Stopwatch _Stopwatch = new Stopwatch();
@@ -150,42 +157,38 @@ namespace Vocaluxe.Base
_ActualPool.RemoveAt(index);
}
private void _CheckModifiers()
private void _CheckModifiers(Keys keys)
{
var keys = Control.ModifierKeys;
_ModShift = (keys & Keys.Shift) == Keys.Shift;
_ModAlt = (keys & Keys.Alt) == Keys.Alt;
_ModCtrl = (keys & Keys.Control) == Keys.Control;
}
public void KeyDown(KeyEventArgs e)
public void KeyDown(Keys keyCode, Keys modifiers)
{
_CheckModifiers();
_CheckModifiers(modifiers);
var repeat = _Keys == e.KeyCode;
var repeat = _Keys == keyCode;
if (!_Timer.IsRunning || _Timer.ElapsedMilliseconds > 75 || !repeat)
{
_Keys = e.KeyCode;
_Keys = keyCode;
_Add(_ModAlt, _ModShift, _ModCtrl, _KeyPressed, repeat ? _Char : Char.MinValue, _Keys);
}
}
public void KeyPress(KeyPressEventArgs e)
public void KeyPress(char keyChar, Keys modifiers)
{
_CheckModifiers();
_CheckModifiers(modifiers);
_Add(_ModAlt, _ModShift, _ModCtrl, true, e.KeyChar, Keys.None);
_Char = e.KeyChar;
_Add(_ModAlt, _ModShift, _ModCtrl, true, keyChar, Keys.None);
_Char = keyChar;
_KeyPressed = true;
}
// ReSharper disable UnusedParameter.Global
public void KeyUp(KeyEventArgs e)
// ReSharper restore UnusedParameter.Global
public void KeyUp(Keys modifiers)
{
_CheckModifiers();
_CheckModifiers(modifiers);
_KeyPressed = false;
}
@@ -236,9 +239,9 @@ namespace Vocaluxe.Base
_Timer = new Stopwatch();
}
private void _Add(int x, int y, bool lb, bool ld, bool rb, int wheel, bool lbh, bool rbh, bool mb, bool mbh)
private void _Add(Keys modifiers, int x, int y, bool lb, bool ld, bool rb, int wheel, bool lbh, bool rbh, bool mb, bool mbh)
{
_CheckModifiers();
_CheckModifiers(modifiers);
x = (int)(x * (float)CSettings.RenderW * CConfig.Config.Graphics.NumScreens / CDraw.GetScreenWidth());
while (x > CSettings.RenderW)
{
@@ -260,9 +263,8 @@ namespace Vocaluxe.Base
_CurrentPool.RemoveAt(index);
}
private void _CheckModifiers()
private void _CheckModifiers(Keys keys)
{
var keys = Control.ModifierKeys;
_Mod = EModifier.None;
if ((keys & Keys.Shift) != 0)
@@ -281,19 +283,19 @@ namespace Vocaluxe.Base
}
}
public void MouseMove(MouseEventArgs e)
public void MouseMove(int x, int y, EMouseButton button, Keys modifiers)
{
_Add(e.X, e.Y, false, false, false, 0, e.Button == MouseButtons.Left, e.Button == MouseButtons.Right, false, e.Button == MouseButtons.Middle);
_Add(modifiers, x, y, false, false, false, 0, button == EMouseButton.Left, button == EMouseButton.Right, false, button == EMouseButton.Middle);
}
public void MouseWheel(MouseEventArgs e)
public void MouseWheel(int x, int y, int delta, Keys modifiers)
{
_Add(e.X, e.Y, false, false, false, e.Delta, false, false, false, false);
_Add(modifiers, x, y, false, false, false, delta, false, false, false, false);
}
public void MouseDown(MouseEventArgs e)
public void MouseDown(int x, int y, EMouseButton button, Keys modifiers)
{
var lb = e.Button == MouseButtons.Left;
var lb = button == EMouseButton.Left;
var ld = false;
if (lb)
{
@@ -313,16 +315,8 @@ namespace Vocaluxe.Base
_Timer.Reset();
}
_Add(e.X, e.Y, lb, ld, e.Button == MouseButtons.Right, e.Delta, false, false,
e.Button == MouseButtons.Middle, false);
}
// ReSharper disable UnusedParameter.Global
public void MouseUp(MouseEventArgs e)
// ReSharper restore UnusedParameter.Global
{
//CheckModifiers();
//Add(_ModALT, _ModSHIFT, _ModCTRL, e.X, e.Y, e.Button == MouseButtons.Left, e.Button == MouseButtons.Right, e.Delta);
_Add(modifiers, x, y, lb, ld, button == EMouseButton.Right, 0, false, false,
button == EMouseButton.Middle, false);
}
public bool PollEvent(ref SMouseEvent mouseEvent)
+6 -2
View File
@@ -15,7 +15,7 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System.Drawing;
using SkiaSharp;
using Vocaluxe.Lib.Webcam;
using VocaluxeLib;
using VocaluxeLib.Draw;
@@ -33,6 +33,7 @@ namespace Vocaluxe.Base
return false;
}
#if WIN
switch (CConfig.Config.Video.WebcamLib)
{
case EWebcamLib.AForgeNet:
@@ -43,6 +44,9 @@ namespace Vocaluxe.Base
_Webcam = new CAForgeNet();
break;
}
#else
return true;
#endif
if (!_Webcam.Init())
{
@@ -72,7 +76,7 @@ namespace Vocaluxe.Base
return _Webcam != null && _Webcam.GetFrame(ref tex);
}
public static Bitmap GetBitmap()
public static SKBitmap GetBitmap()
{
return _Webcam == null ? null : _Webcam.GetBitmap();
}
+16 -33
View File
@@ -17,8 +17,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Text;
using SkiaSharp;
using VocaluxeLib;
using VocaluxeLib.Draw;
using VocaluxeLib.Log;
@@ -28,18 +27,16 @@ namespace Vocaluxe.Base.Fonts
class CFontStyle : IDisposable
{
private readonly string _FilePath;
private readonly EStyle _Style;
public readonly float Outline; //0..1, 0=not outline 1=100% outline
public readonly SColorF OutlineColor;
private readonly float _MaxGlyphHeight;
private readonly Dictionary<char, CGlyph> _Glyphs = new Dictionary<char, CGlyph>();
private PrivateFontCollection _Fonts;
private FontFamily _Family;
private SKTypeface _Typeface;
private bool _TypefaceLoaded;
public CFontStyle(string file, EStyle style, float outline, SColorF outlineColor)
public CFontStyle(string file, float outline, SColorF outlineColor)
{
_FilePath = file;
_Style = style;
Outline = outline;
OutlineColor = outlineColor;
@@ -66,32 +63,18 @@ namespace Vocaluxe.Base.Fonts
}
}
private FontStyle _GetSystemFontStyle()
public SKTypeface GetTypeface()
{
switch (_Style)
if (!_TypefaceLoaded)
{
case EStyle.Normal:
return FontStyle.Regular;
case EStyle.Italic:
return FontStyle.Italic;
case EStyle.Bold:
return FontStyle.Bold;
case EStyle.BoldItalic:
return FontStyle.Bold | FontStyle.Italic;
}
throw new ArgumentException("Invalid style: " + _Style);
}
public Font GetSystemFont(float height)
{
if (_Fonts == null)
{
_Fonts = new PrivateFontCollection();
_TypefaceLoaded = true;
try
{
_Fonts.AddFontFile(_FilePath);
_Family = _Fonts.Families[0];
_Typeface = SKTypeface.FromFile(_FilePath);
if (_Typeface == null)
{
CLog.Error("Error opening font file " + _FilePath);
}
}
catch (Exception e)
{
@@ -99,7 +82,7 @@ namespace Vocaluxe.Base.Fonts
}
}
return new Font(_Family, height, _GetSystemFontStyle(), GraphicsUnit.Pixel);
return _Typeface ?? SKTypeface.Default;
}
public void DrawGlyph(char chr, float fontHeight, float x, float y, float z, SColorF color, bool allMonitors = true)
@@ -172,10 +155,10 @@ namespace Vocaluxe.Base.Fonts
{
if (!_Disposed)
{
if (_Fonts != null)
if (_Typeface != null)
{
_Fonts.Dispose();
_Fonts = null;
_Typeface.Dispose();
_Typeface = null;
}
_UnloadGlyphs();
+7 -6
View File
@@ -21,6 +21,7 @@ using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using SkiaSharp;
using VocaluxeLib;
using VocaluxeLib.Log;
using VocaluxeLib.Menu;
@@ -173,9 +174,9 @@ namespace Vocaluxe.Base.Fonts
return new RectangleF(text.X, text.Y, GetTextWidth(text.TranslatedText, text.CalculatedFont), GetTextHeight(text.TranslatedText, text.CalculatedFont));
}
public static Font GetSystemFont(CFont font)
public static SKTypeface GetTypeface(CFont font)
{
return _GetFontStyle(font).GetSystemFont(font.Height);
return _GetFontStyle(font).GetTypeface();
}
public static float GetOutlineSize(CFont font)
@@ -343,10 +344,10 @@ namespace Vocaluxe.Base.Fonts
{
fontFamily.ThemeName = themeName;
fontFamily.PartyModeId = partyModeId;
fontFamily.Normal = new CFontStyle(Path.Combine(fontFolder, fontFamily.Folder, fontFamily.FileNormal), EStyle.Normal, fontFamily.Outline, fontFamily.OutlineColor);
fontFamily.Italic = new CFontStyle(Path.Combine(fontFolder, fontFamily.Folder, fontFamily.FileItalic), EStyle.Italic, fontFamily.Outline, fontFamily.OutlineColor);
fontFamily.Bold = new CFontStyle(Path.Combine(fontFolder, fontFamily.Folder, fontFamily.FileBold), EStyle.Bold, fontFamily.Outline, fontFamily.OutlineColor);
fontFamily.BoldItalic = new CFontStyle(Path.Combine(fontFolder, fontFamily.Folder, fontFamily.FileBoldItalic), EStyle.BoldItalic, fontFamily.Outline,
fontFamily.Normal = new CFontStyle(Path.Combine(fontFolder, fontFamily.Folder, fontFamily.FileNormal), fontFamily.Outline, fontFamily.OutlineColor);
fontFamily.Italic = new CFontStyle(Path.Combine(fontFolder, fontFamily.Folder, fontFamily.FileItalic), fontFamily.Outline, fontFamily.OutlineColor);
fontFamily.Bold = new CFontStyle(Path.Combine(fontFolder, fontFamily.Folder, fontFamily.FileBold), fontFamily.Outline, fontFamily.OutlineColor);
fontFamily.BoldItalic = new CFontStyle(Path.Combine(fontFolder, fontFamily.Folder, fontFamily.FileBoldItalic), fontFamily.Outline,
fontFamily.OutlineColor);
_FontFamilies.Add(fontFamily);
return true;
+33 -35
View File
@@ -20,10 +20,8 @@
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
using System.Runtime.InteropServices;
using SkiaSharp;
using VocaluxeLib;
using VocaluxeLib.Draw;
@@ -42,21 +40,18 @@ namespace Vocaluxe.Base.Fonts
var outlineSize = fontStyle.Outline * maxHeight;
var chrString = chr.ToString();
var fo = fontStyle.GetSystemFont(maxHeight);
var typeface = fontStyle.GetTypeface();
SizeF fullSize;
Size bmpSize;
using (var g = Graphics.FromHwnd(IntPtr.Zero))
float ascent;
using (var fo = new SKFont(typeface, maxHeight))
{
fullSize = g.MeasureString(chrString, fo);
ascent = -fo.Metrics.Ascent;
var lineSpacing = fo.Spacing;
fullSize = new SizeF(fo.MeasureText(chrString) + maxHeight / 3, lineSpacing);
if (chr != ' ')
{
//Gets exact height and width for drawing more than 1 char. But width is to small to draw char on bitmap as e.g. italic chars will get cropped
//See https://stackoverflow.com/questions/11708621/how-to-measure-width-of-a-string-precisely
var format = StringFormat.GenericTypographic;
var rect = new RectangleF(0, 0, 2000, 2000);
CharacterRange[] ranges = { new CharacterRange(0, chrString.Length) };
format.SetMeasurableCharacterRanges(ranges);
_BoundingBox = g.MeasureCharacterRanges(chrString, fo, rect, format)[0].GetBounds(g).Size;
_BoundingBox = new SizeF(fo.MeasureText(chrString), lineSpacing);
// ReSharper disable CompareOfFloatsByEqualityOperator
if (_BoundingBox.Height == 0)
@@ -72,16 +67,17 @@ namespace Vocaluxe.Base.Fonts
}
else
{
fullSize.Width = maxHeight / 3;
_BoundingBox = fullSize;
_BoundingBox.Height += outlineSize;
bmpSize = new Size(1, 1);
}
}
using (var bmp = new Bitmap(bmpSize.Width, bmpSize.Height, PixelFormat.Format32bppArgb))
using (var g = Graphics.FromImage(bmp))
using (var bmp = new SKBitmap(bmpSize.Width, bmpSize.Height, SKColorType.Bgra8888, SKAlphaType.Premul))
using (var g = new SKCanvas(bmp))
{
g.Clear(Color.Transparent);
g.Clear(SKColors.Transparent);
if (chr == ' ')
{
@@ -90,29 +86,26 @@ namespace Vocaluxe.Base.Fonts
}
else
{
g.SmoothingMode = SmoothingMode.AntiAlias;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
var point = new PointF(outlineSize / 2, outlineSize / 4);
using (var path = new GraphicsPath())
//Have to use size in em not pixels!
using (var drawFont = new SKFont(typeface, ascent) { Edging = SKFontEdging.Antialias, Subpixel = true })
{
//Have to use size in em not pixels!
var emSize = fo.Size * fo.FontFamily.GetCellAscent(fo.Style) / fo.FontFamily.GetEmHeight(fo.Style);
path.AddString(chrString, fo.FontFamily, (int)fo.Style, emSize, point, new StringFormat());
var point = new SKPoint(outlineSize / 2 + ascent / 6, outlineSize / 4 - drawFont.Metrics.Ascent);
using (var pen = new Pen(fontStyle.OutlineColor.AsColor(), outlineSize))
using (var path = drawFont.GetTextPath(chrString, point))
using (var pen = new SKPaint { Style = SKPaintStyle.Stroke, StrokeWidth = outlineSize, StrokeJoin = SKStrokeJoin.Round, IsAntialias = true, Color = _ToSKColor(fontStyle.OutlineColor) })
using (var brush = new SKPaint { Style = SKPaintStyle.Fill, IsAntialias = true, Color = SKColors.White })
{
pen.LineJoin = LineJoin.Round;
g.DrawPath(pen, path);
g.FillPath(Brushes.White, path);
g.DrawPath(path, pen);
g.DrawPath(path, brush);
}
}
g.Flush();
_DrawBounding = _GetRealBounds(bmp);
using (var bmpCropped = bmp.Clone(_DrawBounding, PixelFormat.Format32bppArgb))
using (var bmpCropped = new SKBitmap())
{
var bounds = Rectangle.Round(_DrawBounding);
bmp.ExtractSubset(bmpCropped, new SKRectI(bounds.Left, bounds.Top, bounds.Right, bounds.Bottom));
var dx = (fullSize.Width - _BoundingBox.Width - 1) / 2;
_DrawBounding.X -= dx;
_Texture = CDraw.AddTexture(bmpCropped);
@@ -134,6 +127,12 @@ namespace Vocaluxe.Base.Fonts
}
}
private static SKColor _ToSKColor(SColorF color)
{
var c = color.AsColor();
return new SKColor(c.R, c.G, c.B, c.A);
}
public void UnloadTexture()
{
CDraw.RemoveTexture(ref _Texture);
@@ -165,13 +164,12 @@ namespace Vocaluxe.Base.Fonts
rect = new SRectF(x, y, w, h, z);
}
private static Rectangle _GetRealBounds(Bitmap bmp)
private static Rectangle _GetRealBounds(SKBitmap bmp)
{
int minX = 0, maxX = bmp.Width - 1, minY = 0;
var bmpData = bmp.LockBits(bmp.GetRect(), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
var values = bmpData.Width * bmp.Height;
var values = bmp.Width * bmp.Height;
var rgbValues = new Int32[values];
Marshal.Copy(bmpData.Scan0, rgbValues, 0, values);
Marshal.Copy(bmp.GetPixels(), rgbValues, 0, values);
var index = 0;
var found = false;
//find from top
-1
View File
@@ -19,7 +19,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using Vocaluxe.Lib.Input;
using VocaluxeLib;
using VocaluxeLib.Menu;
+2 -1
View File
@@ -16,6 +16,7 @@
#endregion
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Vocaluxe
@@ -39,7 +40,7 @@ namespace Vocaluxe
var newPath = Environment.GetEnvironmentVariable("PATH") ?? string.Empty;
if (newPath.Length > 0)
{
newPath += ";";
newPath += Path.PathSeparator;
}
newPath += path;
+1 -53
View File
@@ -17,9 +17,7 @@
using System.IO;
using System.Reflection;
using Microsoft.Win32;
using Vocaluxe.Base;
using VocaluxeLib.Log;
namespace Vocaluxe
{
@@ -28,46 +26,6 @@ namespace Vocaluxe
/// </summary>
static class CProgrammHelper
{
private static bool _IsVC2015To2022Installed()
{
const string baseKey = @"SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\";
const string wow6432BaseKey = @"SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\";
#if ARCH_X64
string[] arches = { "x64" };
#elif ARCH_X86
string[] arches = { "x86" };
#else
string[] arches = { "x86", "x64" };
#endif
foreach (var arch in arches)
{
using (var rk = Registry.LocalMachine.OpenSubKey(baseKey + arch) ??
Registry.LocalMachine.OpenSubKey(wow6432BaseKey + arch))
{
if (rk == null)
{
continue;
}
var installed = rk.GetValue("Installed");
if (installed == null)
{
continue;
}
int installedValue;
if (int.TryParse(installed.ToString(), out installedValue) && installedValue == 1)
{
return true;
}
}
}
return false;
}
private static void _EnsureDataFolderExists()
{
if (!Directory.Exists(CSettings.DataFolder))
@@ -89,17 +47,7 @@ namespace Vocaluxe
public static bool CheckRequirements()
{
#if WIN
if (!_IsVC2015To2022Installed())
{
CLog.Fatal(
"VC++ 2015-2022 Redistributables are missing. Please install them first.\r\n" +
"Download x64: https://aka.ms/vc14/vc_redist.x64.exe\r\n" +
"Download x86: https://aka.ms/vc14/vc_redist.x86.exe");
return false;
}
#endif //TODO: check for dependencies on linux?
//TODO: check for dependencies on linux?
return true;
}
+54 -51
View File
@@ -16,17 +16,19 @@
#endregion
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using SDL;
using SkiaSharp;
using Vocaluxe.Base;
using Vocaluxe.Lib;
using VocaluxeLib.Log;
namespace Vocaluxe
{
class CSplashScreen : Form
unsafe class CSplashScreen
{
private readonly Bitmap _Logo;
private readonly SKBitmap _Logo;
private SDL_Window* _Window;
public CSplashScreen()
{
@@ -35,8 +37,7 @@ namespace Vocaluxe
{
try
{
_Logo = new Bitmap(path);
ClientSize = new Size(_Logo.Width, _Logo.Height);
_Logo = SKBitmap.Decode(path);
}
catch (Exception e)
{
@@ -48,55 +49,57 @@ namespace Vocaluxe
CLog.Error("Can't find " + path);
}
path = Path.Combine(CSettings.ProgramFolder, CSettings.FileNameIcon);
if (File.Exists(path))
{
try
{
Icon = new Icon(path);
}
catch (Exception e)
{
CLog.Error("Error loading icon: " + e.Message);
}
}
else
{
CLog.Error("Can't find " + path);
}
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
BackColor = Color.Transparent;
FormBorderStyle = FormBorderStyle.None;
Text = CSettings.ProgramName;
CenterToScreen();
Show();
}
public override sealed string Text
{
get { return base.Text; }
set { base.Text = value; }
}
public override sealed Color BackColor
{
get { return base.BackColor; }
set { base.BackColor = value; }
}
protected override void OnPaint(PaintEventArgs e) { }
protected override void OnPaintBackground(PaintEventArgs e)
{
if (_Logo == null)
{
return;
}
var g = e.Graphics;
g.DrawImage(_Logo, new Rectangle(0, 0, Width, Height));
_Window = SDL3.SDL_CreateWindow(CSettings.ProgramName, _Logo.Width, _Logo.Height, SDL_WindowFlags.SDL_WINDOW_BORDERLESS | SDL_WindowFlags.SDL_WINDOW_HIDDEN);
if (_Window == null)
{
CLog.Error("Error creating the splash screen: " + SDL3.SDL_GetError());
return;
}
CSdl.SetWindowIcon(_Window, Path.Combine(CSettings.ProgramFolder, CSettings.FileNameIcon));
SDL3.SDL_SetWindowPosition(_Window, (int)SDL3.SDL_WINDOWPOS_CENTERED, (int)SDL3.SDL_WINDOWPOS_CENTERED);
SDL3.SDL_ShowWindow(_Window);
_Paint();
}
private void _Paint()
{
var surface = SDL3.SDL_GetWindowSurface(_Window);
if (surface == null)
{
return;
}
var colorType = surface->format == SDL_PixelFormat.SDL_PIXELFORMAT_ABGR8888 || surface->format == SDL_PixelFormat.SDL_PIXELFORMAT_XBGR8888
? SKColorType.Rgba8888 : SKColorType.Bgra8888;
using (var target = SKSurface.Create(new SKImageInfo(surface->w, surface->h, colorType, SKAlphaType.Premul), surface->pixels, surface->pitch))
using (var image = SKImage.FromBitmap(_Logo))
{
if (target != null)
{
target.Canvas.Clear(SKColors.Black);
target.Canvas.DrawImage(image, SKRect.Create(surface->w, surface->h), new SKSamplingOptions(SKCubicResampler.Mitchell));
target.Canvas.Flush();
}
}
SDL3.SDL_UpdateWindowSurface(_Window);
}
public void Close()
{
if (_Window != null)
{
SDL3.SDL_DestroyWindow(_Window);
_Window = null;
}
_Logo?.Dispose();
}
}
}
}
+393
View File
@@ -0,0 +1,393 @@
#region license
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using SDL;
using SkiaSharp;
using Vocaluxe.Base;
using VocaluxeLib;
using VocaluxeLib.Log;
namespace Vocaluxe.Lib
{
static unsafe class CSdl
{
private static bool _Initialized;
private static string _FolderDialogResult;
private static int _FolderDialogDone;
public static SDL_Window* MainWindow { get; set; }
public static bool Init()
{
if (_Initialized)
{
return true;
}
SDL3.SDL_SetHint(SDL3.SDL_HINT_APP_NAME, CSettings.ProgramName);
#if ARCH_X86
SDL3.SDL_SetHint(SDL3.SDL_HINT_JOYSTICK_GAMEINPUT, "0");
SDL3.SDL_SetHint(SDL3.SDL_HINT_JOYSTICK_GAMEINPUT_RAW, "0");
SDL3.SDL_SetHint(SDL3.SDL_HINT_WINDOWS_GAMEINPUT, "0");
#endif
if (!SDL3.SDL_Init(SDL_InitFlags.SDL_INIT_VIDEO | SDL_InitFlags.SDL_INIT_GAMEPAD))
{
CLog.Error("Failed to initialize SDL: " + SDL3.SDL_GetError());
return false;
}
_Initialized = true;
return true;
}
public static void Close()
{
if (!_Initialized)
{
return;
}
SDL3.SDL_Quit();
_Initialized = false;
}
public static void DoEvents()
{
if (_Initialized)
{
SDL3.SDL_PumpEvents();
}
}
public static void ShowMessage(string title, string message, bool error = false)
{
SDL3.SDL_ShowSimpleMessageBox(error ? SDL_MessageBoxFlags.SDL_MESSAGEBOX_ERROR : SDL_MessageBoxFlags.SDL_MESSAGEBOX_INFORMATION, title, message, MainWindow);
}
public static int ShowMessage(string title, string message, bool error, params string[] buttons)
{
var allocated = new List<IntPtr>();
try
{
var buttonData = stackalloc SDL_MessageBoxButtonData[buttons.Length];
for (var i = 0; i < buttons.Length; i++)
{
buttonData[i].buttonID = i;
buttonData[i].text = _ToUtf8(buttons[i], allocated);
buttonData[i].flags = i == 0 ? SDL_MessageBoxButtonFlags.SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT : 0;
}
var data = new SDL_MessageBoxData
{
flags = (error ? SDL_MessageBoxFlags.SDL_MESSAGEBOX_ERROR : SDL_MessageBoxFlags.SDL_MESSAGEBOX_INFORMATION) | SDL_MessageBoxFlags.SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT,
window = MainWindow,
title = _ToUtf8(title, allocated),
message = _ToUtf8(message, allocated),
numbuttons = buttons.Length,
buttons = buttonData
};
int buttonId;
if (!SDL3.SDL_ShowMessageBox(&data, &buttonId))
{
CLog.Error("Failed to show message box: " + SDL3.SDL_GetError());
return -1;
}
return buttonId;
}
finally
{
foreach (var ptr in allocated)
{
Marshal.FreeHGlobal(ptr);
}
}
}
private static byte* _ToUtf8(string text, List<IntPtr> allocated)
{
var bytes = Encoding.UTF8.GetBytes((text ?? "") + "\0");
var ptr = Marshal.AllocHGlobal(bytes.Length);
Marshal.Copy(bytes, 0, ptr, bytes.Length);
allocated.Add(ptr);
return (byte*)ptr;
}
public static string ShowFolderDialog(string title)
{
_FolderDialogResult = null;
Interlocked.Exchange(ref _FolderDialogDone, 0);
var props = SDL3.SDL_CreateProperties();
SDL3.SDL_SetStringProperty(props, SDL3.SDL_PROP_FILE_DIALOG_TITLE_STRING, title);
SDL3.SDL_SetPointerProperty(props, SDL3.SDL_PROP_FILE_DIALOG_WINDOW_POINTER, (IntPtr)MainWindow);
SDL3.SDL_SetBooleanProperty(props, SDL3.SDL_PROP_FILE_DIALOG_MANY_BOOLEAN, false);
SDL3.SDL_ShowFileDialogWithProperties(SDL_FileDialogType.SDL_FILEDIALOG_OPENFOLDER, &_OnFolderSelected, IntPtr.Zero, props);
SDL3.SDL_DestroyProperties(props);
while (Volatile.Read(ref _FolderDialogDone) == 0)
{
SDL3.SDL_PumpEvents();
Thread.Sleep(10);
}
return _FolderDialogResult;
}
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
private static void _OnFolderSelected(IntPtr userdata, byte** fileList, int filter)
{
if (fileList != null && fileList[0] != null)
{
_FolderDialogResult = Marshal.PtrToStringUTF8((IntPtr)fileList[0]);
}
Volatile.Write(ref _FolderDialogDone, 1);
}
public static void OpenUrl(string url)
{
SDL3.SDL_OpenURL(url);
}
public static void SetClipboardText(string text)
{
SDL3.SDL_SetClipboardText(text);
}
public static int GetDisplayCount()
{
using (var displays = SDL3.SDL_GetDisplays())
{
return displays == null ? 0 : displays.Count;
}
}
public static System.Drawing.Size GetPrimaryDisplaySize()
{
SDL_Rect bounds;
if (!SDL3.SDL_GetDisplayBounds(SDL3.SDL_GetPrimaryDisplay(), &bounds))
{
return System.Drawing.Size.Empty;
}
return new System.Drawing.Size(bounds.w, bounds.h);
}
public static void SetWindowIcon(SDL_Window* window, string iconPath)
{
if (!File.Exists(iconPath))
{
CLog.Error("Can't find " + iconPath);
return;
}
try
{
using (var icon = SKBitmap.Decode(iconPath))
using (var converted = new SKBitmap(new SKImageInfo(icon.Width, icon.Height, SKColorType.Bgra8888, SKAlphaType.Unpremul)))
{
icon.CopyPixelsTo(converted);
var surface = SDL3.SDL_CreateSurfaceFrom(converted.Width, converted.Height, SDL_PixelFormat.SDL_PIXELFORMAT_ARGB8888, converted.GetPixels(),
converted.RowBytes);
if (surface == null)
{
return;
}
SDL3.SDL_SetWindowIcon(window, surface);
SDL3.SDL_DestroySurface(surface);
}
}
catch (Exception e)
{
CLog.Error("Error loading icon: " + e.Message);
}
}
public static Keys GetModifiers(SDL_Keymod mod)
{
var result = Keys.None;
if ((mod & SDL_Keymod.SDL_KMOD_SHIFT) != 0)
{
result |= Keys.Shift;
}
if ((mod & SDL_Keymod.SDL_KMOD_CTRL) != 0)
{
result |= Keys.Control;
}
if ((mod & SDL_Keymod.SDL_KMOD_ALT) != 0)
{
result |= Keys.Alt;
}
return result;
}
public static Keys GetModifiers()
{
return GetModifiers(SDL3.SDL_GetModState());
}
public static Keys GetKey(SDL_Keycode key)
{
if (key >= SDL_Keycode.SDLK_A && key <= SDL_Keycode.SDLK_Z)
{
return Keys.A + (int)(key - SDL_Keycode.SDLK_A);
}
if (key >= SDL_Keycode.SDLK_0 && key <= SDL_Keycode.SDLK_9)
{
return Keys.D0 + (int)(key - SDL_Keycode.SDLK_0);
}
if (key >= SDL_Keycode.SDLK_F1 && key <= SDL_Keycode.SDLK_F12)
{
return Keys.F1 + (int)(key - SDL_Keycode.SDLK_F1);
}
if (key >= SDL_Keycode.SDLK_KP_1 && key <= SDL_Keycode.SDLK_KP_9)
{
return Keys.NumPad1 + (int)(key - SDL_Keycode.SDLK_KP_1);
}
switch (key)
{
case SDL_Keycode.SDLK_BACKSPACE:
return Keys.Back;
case SDL_Keycode.SDLK_TAB:
return Keys.Tab;
case SDL_Keycode.SDLK_RETURN:
case SDL_Keycode.SDLK_KP_ENTER:
return Keys.Enter;
case SDL_Keycode.SDLK_ESCAPE:
return Keys.Escape;
case SDL_Keycode.SDLK_SPACE:
return Keys.Space;
case SDL_Keycode.SDLK_PAGEUP:
return Keys.PageUp;
case SDL_Keycode.SDLK_PAGEDOWN:
return Keys.PageDown;
case SDL_Keycode.SDLK_END:
return Keys.End;
case SDL_Keycode.SDLK_HOME:
return Keys.Home;
case SDL_Keycode.SDLK_LEFT:
return Keys.Left;
case SDL_Keycode.SDLK_UP:
return Keys.Up;
case SDL_Keycode.SDLK_RIGHT:
return Keys.Right;
case SDL_Keycode.SDLK_DOWN:
return Keys.Down;
case SDL_Keycode.SDLK_PRINTSCREEN:
return Keys.PrintScreen;
case SDL_Keycode.SDLK_INSERT:
return Keys.Insert;
case SDL_Keycode.SDLK_DELETE:
return Keys.Delete;
case SDL_Keycode.SDLK_PAUSE:
return Keys.Pause;
case SDL_Keycode.SDLK_CAPSLOCK:
return Keys.CapsLock;
case SDL_Keycode.SDLK_NUMLOCKCLEAR:
return Keys.NumLock;
case SDL_Keycode.SDLK_SCROLLLOCK:
return Keys.Scroll;
case SDL_Keycode.SDLK_KP_0:
return Keys.NumPad0;
case SDL_Keycode.SDLK_KP_MULTIPLY:
return Keys.Multiply;
case SDL_Keycode.SDLK_KP_PLUS:
return Keys.Add;
case SDL_Keycode.SDLK_KP_MINUS:
return Keys.Subtract;
case SDL_Keycode.SDLK_KP_PERIOD:
case SDL_Keycode.SDLK_KP_DECIMAL:
return Keys.Decimal;
case SDL_Keycode.SDLK_KP_DIVIDE:
return Keys.Divide;
case SDL_Keycode.SDLK_LSHIFT:
case SDL_Keycode.SDLK_RSHIFT:
return Keys.ShiftKey;
case SDL_Keycode.SDLK_LCTRL:
case SDL_Keycode.SDLK_RCTRL:
return Keys.ControlKey;
case SDL_Keycode.SDLK_LALT:
case SDL_Keycode.SDLK_RALT:
return Keys.Menu;
case SDL_Keycode.SDLK_LGUI:
return Keys.LWin;
case SDL_Keycode.SDLK_RGUI:
return Keys.RWin;
case SDL_Keycode.SDLK_APPLICATION:
return Keys.Apps;
case SDL_Keycode.SDLK_MEDIA_NEXT_TRACK:
return Keys.MediaNextTrack;
case SDL_Keycode.SDLK_MEDIA_PREVIOUS_TRACK:
return Keys.MediaPreviousTrack;
case SDL_Keycode.SDLK_MEDIA_STOP:
return Keys.MediaStop;
case SDL_Keycode.SDLK_MEDIA_PLAY_PAUSE:
case SDL_Keycode.SDLK_MEDIA_PLAY:
case SDL_Keycode.SDLK_MEDIA_PAUSE:
return Keys.MediaPlayPause;
case SDL_Keycode.SDLK_MUTE:
return Keys.VolumeMute;
case SDL_Keycode.SDLK_VOLUMEDOWN:
return Keys.VolumeDown;
case SDL_Keycode.SDLK_VOLUMEUP:
return Keys.VolumeUp;
case SDL_Keycode.SDLK_SEMICOLON:
return Keys.OemSemicolon;
case SDL_Keycode.SDLK_PLUS:
case SDL_Keycode.SDLK_EQUALS:
return Keys.Oemplus;
case SDL_Keycode.SDLK_COMMA:
return Keys.Oemcomma;
case SDL_Keycode.SDLK_MINUS:
return Keys.OemMinus;
case SDL_Keycode.SDLK_PERIOD:
return Keys.OemPeriod;
case SDL_Keycode.SDLK_SLASH:
return Keys.OemQuestion;
case SDL_Keycode.SDLK_GRAVE:
return Keys.Oemtilde;
case SDL_Keycode.SDLK_LEFTBRACKET:
return Keys.OemOpenBrackets;
case SDL_Keycode.SDLK_BACKSLASH:
return Keys.OemPipe;
case SDL_Keycode.SDLK_RIGHTBRACKET:
return Keys.OemCloseBrackets;
case SDL_Keycode.SDLK_APOSTROPHE:
return Keys.OemQuotes;
}
return Keys.None;
}
}
}
+10 -15
View File
@@ -16,11 +16,11 @@
#endregion
using System;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.Data.Sqlite;
using SkiaSharp;
using Vocaluxe.Base;
using VocaluxeLib;
using VocaluxeLib.Draw;
@@ -30,8 +30,7 @@ namespace Vocaluxe.Lib.Database
{
public class CCoverDB : CDatabaseBase
{
private const long _JpegQuality = 90;
private static readonly ImageCodecInfo _JpegCodec = ImageCodecInfo.GetImageEncoders().First(codec => codec.FormatID == ImageFormat.Jpeg.Guid);
private const int _JpegQuality = 90;
private SqliteTransaction _TransactionCover;
@@ -94,7 +93,7 @@ namespace Vocaluxe.Lib.Database
try
{
using (var stream = new MemoryStream(cachedData))
using (var source = new System.Drawing.Bitmap(stream))
using (var source = SKBitmap.Decode(stream) ?? throw new InvalidDataException("Invalid image data"))
tex = CDraw.EnqueueTexture(_FitToMaxSize(source, maxSize));
}
catch (Exception e)
@@ -126,7 +125,7 @@ namespace Vocaluxe.Lib.Database
height = bitmap.Height;
data = source.Width <= maxSize && source.Height <= maxSize
? File.ReadAllBytes(coverPath)
: _EncodeCover(bitmap, source.PixelFormat);
: _EncodeCover(bitmap, source.AlphaType != SKAlphaType.Opaque);
}
catch
{
@@ -147,11 +146,11 @@ namespace Vocaluxe.Lib.Database
return true;
}
private static System.Drawing.Bitmap _FitToMaxSize(System.Drawing.Bitmap source, int maxSize)
private static SKBitmap _FitToMaxSize(SKBitmap source, int maxSize)
{
var sourceSize = source.GetSize();
if (sourceSize.Width <= maxSize && sourceSize.Height <= maxSize)
return new System.Drawing.Bitmap(source);
return source.Copy();
var targetSize = CHelper.FitInBounds(
new SRectF(0, 0, maxSize, maxSize, 0),
@@ -162,21 +161,17 @@ namespace Vocaluxe.Lib.Database
return source.Resize(targetSize) ?? throw new InvalidOperationException("Resizing the cover failed");
}
private static byte[] _EncodeCover(System.Drawing.Bitmap bitmap, PixelFormat sourceFormat)
private static byte[] _EncodeCover(SKBitmap bitmap, bool hasAlpha)
{
using (var stream = new MemoryStream())
{
if (System.Drawing.Image.IsAlphaPixelFormat(sourceFormat))
if (hasAlpha)
{
bitmap.Save(stream, ImageFormat.Png);
bitmap.Encode(stream, SKEncodedImageFormat.Png, 100);
}
else
{
using (var parameters = new EncoderParameters(1))
{
parameters.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, _JpegQuality);
bitmap.Save(stream, _JpegCodec, parameters);
}
bitmap.Encode(stream, SKEncodedImageFormat.Jpeg, _JpegQuality);
}
return stream.ToArray();
File diff suppressed because it is too large. Load diff
+254
View File
@@ -0,0 +1,254 @@
#region license
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using SDL;
using Vocaluxe.Base;
using VocaluxeLib;
using VocaluxeLib.Log;
namespace Vocaluxe.Lib.Draw
{
abstract unsafe class CDrawBaseSDL<TTextureType> : CDrawBase<TTextureType> where TTextureType : CTextureBase, IDisposable
{
protected SDL_Window* _Window;
protected bool _CreateWindow(SDL_WindowFlags flags)
{
_Window = SDL3.SDL_CreateWindow(CSettings.GetFullVersionText(), CConfig.Config.Graphics.ScreenW * CConfig.Config.Graphics.NumScreens, CConfig.Config.Graphics.ScreenH,
flags | SDL_WindowFlags.SDL_WINDOW_RESIZABLE | SDL_WindowFlags.SDL_WINDOW_HIDDEN | SDL_WindowFlags.SDL_WINDOW_HIGH_PIXEL_DENSITY);
if (_Window == null)
{
CLog.Error("Failed to create the window: " + SDL3.SDL_GetError());
return false;
}
CSdl.MainWindow = _Window;
return true;
}
protected Size _GetClientSize()
{
int w, h;
if (_Window == null || !SDL3.SDL_GetWindowSizeInPixels(_Window, &w, &h))
{
return Size.Empty;
}
return new Size(w, h);
}
public override void Close()
{
base.Close();
if (_Window != null)
{
if (CSdl.MainWindow == _Window)
{
CSdl.MainWindow = null;
}
SDL3.SDL_DestroyWindow(_Window);
_Window = null;
}
}
protected override void _EnterFullScreen()
{
Debug.Assert(!_Fullscreen);
_Fullscreen = true;
SDL3.SDL_SetWindowFullscreen(_Window, true);
SDL3.SDL_SyncWindow(_Window);
_DoResize();
}
protected override void _LeaveFullScreen()
{
Debug.Assert(_Fullscreen);
_Fullscreen = false;
SDL3.SDL_SetWindowFullscreen(_Window, false);
SDL3.SDL_SyncWindow(_Window);
_DoResize();
}
#region event handlers
protected void _HandleEvents()
{
SDL_Event e;
while (SDL3.SDL_PollEvent(&e))
{
switch (e.Type)
{
case SDL_EventType.SDL_EVENT_QUIT:
case SDL_EventType.SDL_EVENT_WINDOW_CLOSE_REQUESTED:
_Run = false;
break;
case SDL_EventType.SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED:
_DoResize();
break;
case SDL_EventType.SDL_EVENT_WINDOW_MOUSE_ENTER:
SDL3.SDL_HideCursor();
_Mouse.Visible = true;
break;
case SDL_EventType.SDL_EVENT_WINDOW_MOUSE_LEAVE:
_Mouse.Visible = false;
SDL3.SDL_ShowCursor();
break;
case SDL_EventType.SDL_EVENT_KEY_DOWN:
_OnKeyDown(e.key);
break;
case SDL_EventType.SDL_EVENT_KEY_UP:
_Keys.KeyUp(CSdl.GetModifiers(e.key.mod));
break;
case SDL_EventType.SDL_EVENT_TEXT_INPUT:
var text = e.text.GetText();
if (!string.IsNullOrEmpty(text))
{
var modifiers = CSdl.GetModifiers();
foreach (var chr in text)
{
_Keys.KeyPress(chr, modifiers);
}
}
break;
case SDL_EventType.SDL_EVENT_MOUSE_MOTION:
_Mouse.MouseMove(_ToPixelX(e.motion.x), _ToPixelY(e.motion.y), _GetHeldButton(e.motion.state), CSdl.GetModifiers());
break;
case SDL_EventType.SDL_EVENT_MOUSE_BUTTON_DOWN:
_Mouse.MouseDown(_ToPixelX(e.button.x), _ToPixelY(e.button.y), _GetButton(e.button.Button), CSdl.GetModifiers());
break;
case SDL_EventType.SDL_EVENT_MOUSE_WHEEL:
var delta = e.wheel.direction == SDL_MouseWheelDirection.SDL_MOUSEWHEEL_FLIPPED ? -e.wheel.y : e.wheel.y;
_Mouse.MouseWheel(_ToPixelX(e.wheel.mouse_x), _ToPixelY(e.wheel.mouse_y), (int)Math.Round(delta * 120), CSdl.GetModifiers());
break;
}
}
}
private void _OnKeyDown(SDL_KeyboardEvent key)
{
var keyCode = CSdl.GetKey(key.key);
var modifiers = CSdl.GetModifiers(key.mod);
if (keyCode == Keys.None)
{
return;
}
_Keys.KeyDown(keyCode, modifiers);
switch (keyCode)
{
case Keys.Enter:
_Keys.KeyPress('\r', modifiers);
break;
case Keys.Back:
_Keys.KeyPress('\b', modifiers);
break;
case Keys.Escape:
_Keys.KeyPress((char)27, modifiers);
break;
case Keys.Tab:
_Keys.KeyPress('\t', modifiers);
break;
}
}
private int _ToPixelX(float x)
{
int w, h;
SDL3.SDL_GetWindowSize(_Window, &w, &h);
return w > 0 ? (int)(x * _GetClientSize().Width / w) : (int)x;
}
private int _ToPixelY(float y)
{
int w, h;
SDL3.SDL_GetWindowSize(_Window, &w, &h);
return h > 0 ? (int)(y * _GetClientSize().Height / h) : (int)y;
}
private static EMouseButton _GetButton(SDLButton button)
{
switch (button)
{
case SDLButton.SDL_BUTTON_LEFT:
return EMouseButton.Left;
case SDLButton.SDL_BUTTON_RIGHT:
return EMouseButton.Right;
case SDLButton.SDL_BUTTON_MIDDLE:
return EMouseButton.Middle;
}
return EMouseButton.None;
}
private static EMouseButton _GetHeldButton(SDL_MouseButtonFlags state)
{
if ((state & SDL_MouseButtonFlags.SDL_BUTTON_LMASK) != 0)
{
return EMouseButton.Left;
}
if ((state & SDL_MouseButtonFlags.SDL_BUTTON_RMASK) != 0)
{
return EMouseButton.Right;
}
if ((state & SDL_MouseButtonFlags.SDL_BUTTON_MMASK) != 0)
{
return EMouseButton.Middle;
}
return EMouseButton.None;
}
#endregion
public override bool Init()
{
if (!base.Init())
{
return false;
}
if (_Window == null)
{
return false;
}
CSdl.SetWindowIcon(_Window, Path.Combine(CSettings.ProgramFolder, CSettings.FileNameIcon));
SDL3.SDL_SetWindowPosition(_Window, (int)SDL3.SDL_WINDOWPOS_CENTERED, (int)SDL3.SDL_WINDOWPOS_CENTERED);
SDL3.SDL_StartTextInput(_Window);
return true;
}
public override void MainLoop()
{
SDL3.SDL_ShowWindow(_Window);
SDL3.SDL_RaiseWindow(_Window);
_ClearScreen();
base.MainLoop();
SDL3.SDL_HideWindow(_Window);
}
}
}
-227
View File
@@ -1,227 +0,0 @@
#region license
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using Vocaluxe.Base;
namespace Vocaluxe.Lib.Draw
{
public delegate bool MessageEventHandler(ref Message m);
public interface IFormHook
{
MessageEventHandler OnMessage { set; }
}
abstract class CDrawBaseWindows<TTextureType> : CDrawBase<TTextureType> where TTextureType : CTextureBase, IDisposable
{
private struct SClientRect
{
public Point Location;
public int Width;
public int Height;
}
protected Form _Form;
private SClientRect _Restore;
protected Size _SizeBeforeMinimize;
public override void Close()
{
base.Close();
try
{
_Form.Close();
}
catch { }
}
protected void _CenterToScreen()
{
var screen = Screen.FromControl(_Form);
_Form.Location = new Point((screen.WorkingArea.Width - _Form.Width) / 2,
(screen.WorkingArea.Height - _Form.Height) / 2);
}
private static bool _OnMessageAvoidScreenOff(ref Message m)
{
switch (m.Msg)
{
case 0x112: // WM_SYSCOMMAND
switch ((int)m.WParam & 0xFFF0)
{
case 0xF100: // SC_KEYMENU
m.Result = IntPtr.Zero;
return false;
case 0xF140: // SC_SCREENSAVER
case 0xF170: // SC_MONITORPOWER
return false;
}
break;
}
return true;
}
protected override void _EnterFullScreen()
{
Debug.Assert(!_Fullscreen);
_Fullscreen = true;
_Restore.Location = _Form.Location;
_Restore.Width = _Form.Width;
_Restore.Height = _Form.Height;
_Form.FormBorderStyle = FormBorderStyle.None;
var screen = Screen.FromControl(_Form);
_Form.DesktopBounds = new Rectangle(screen.Bounds.Location, new Size(screen.Bounds.Width, screen.Bounds.Height));
if (_Form.WindowState == FormWindowState.Maximized)
{
_Form.WindowState = FormWindowState.Normal;
_DoResize();
_Form.WindowState = FormWindowState.Maximized;
}
else
{
_DoResize();
}
}
protected override void _LeaveFullScreen()
{
Debug.Assert(_Fullscreen);
_Fullscreen = false;
_Form.FormBorderStyle = FormBorderStyle.Sizable;
_Form.DesktopBounds = new Rectangle(_Restore.Location, new Size(_Restore.Width, _Restore.Height));
}
#region form event handlers
private void _OnClose(object sender, CancelEventArgs e)
{
_Run = false;
}
private void _OnLoad(object sender, EventArgs e)
{
_ClearScreen();
}
protected virtual void _OnResize(object sender, EventArgs e)
{
_DoResize();
}
#region mouse event handlers
protected void _OnMouseMove(object sender, MouseEventArgs e)
{
_Mouse.MouseMove(e);
}
protected void _OnMouseWheel(object sender, MouseEventArgs e)
{
_Mouse.MouseWheel(e);
}
protected void _OnMouseDown(object sender, MouseEventArgs e)
{
_Mouse.MouseDown(e);
}
protected void _OnMouseUp(object sender, MouseEventArgs e)
{
_Mouse.MouseUp(e);
}
protected void _OnMouseLeave(object sender, EventArgs e)
{
_Mouse.Visible = false;
#if !WIN && !DEBUG
_Form.Cursor = Cursors.Default;
#endif
Cursor.Show();
}
protected void _OnMouseEnter(object sender, EventArgs e)
{
Cursor.Hide();
_Mouse.Visible = true;
#if !WIN && !DEBUG //don't want to be stuck without a cursor when debugging
_Form.Cursor = new Cursor("Linux/blank.cur"); //Cursor.Hide() doesn't work in Mono
#endif
}
#endregion
#region keyboard event handlers
protected void _OnPreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
_OnKeyDown(sender, new KeyEventArgs(e.KeyData));
}
protected void _OnKeyDown(object sender, KeyEventArgs e)
{
_Keys.KeyDown(e);
}
protected void _OnKeyPress(object sender, KeyPressEventArgs e)
{
_Keys.KeyPress(e);
}
protected void _OnKeyUp(object sender, KeyEventArgs e)
{
_Keys.KeyUp(e);
}
#endregion keyboard event handlers
#endregion
public override bool Init()
{
if (!base.Init())
{
return false;
}
_Form.Icon = new Icon(Path.Combine(CSettings.ProgramFolder, CSettings.FileNameIcon));
_Form.Text = CSettings.GetFullVersionText();
((IFormHook)_Form).OnMessage = _OnMessageAvoidScreenOff;
_Form.Closing += _OnClose;
_Form.Resize += _OnResize;
_Form.Load += _OnLoad;
_SizeBeforeMinimize = _Form.ClientSize;
_CenterToScreen();
return true;
}
public override void MainLoop()
{
_Form.Show();
base.MainLoop();
_Form.Hide();
}
}
}
+275
View File
@@ -0,0 +1,275 @@
#region license
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Drawing;
using System.IO;
using SDL;
using SkiaSharp;
using Vocaluxe.Base;
using VocaluxeLib;
using VocaluxeLib.Draw;
namespace Vocaluxe.Lib.Draw
{
class CSoftwareTexture : CTextureBase
{
public readonly SKBitmap Bitmap;
public readonly SKImage Image;
public CSoftwareTexture(Size dataSize) : base(dataSize, dataSize)
{
if (dataSize.Width <= 0 || dataSize.Height <= 0)
{
return;
}
Bitmap = new SKBitmap(new SKImageInfo(dataSize.Width, dataSize.Height, SKColorType.Bgra8888, SKAlphaType.Unpremul));
Image = SKImage.FromPixels(Bitmap.PeekPixels());
}
public override bool IsLoaded
{
get { return Bitmap != null; }
}
public override void Dispose()
{
if (IsDisposed)
{
return;
}
base.Dispose();
Image?.Dispose();
Bitmap?.Dispose();
}
}
unsafe class CDrawSoftware : CDrawBaseSDL<CSoftwareTexture>, IDraw
{
private readonly SKBitmap _Backbuffer;
private readonly SKCanvas _Canvas;
private readonly SKColor _ClearColor = new SKColor(0, 0, 139);
private CTextureRef _BlankTexture;
public CDrawSoftware()
{
_CreateWindow(0);
_Backbuffer = new SKBitmap(CSettings.RenderW * CConfig.Config.Graphics.NumScreens, CSettings.RenderH, SKColorType.Bgra8888, SKAlphaType.Premul);
_Canvas = new SKCanvas(_Backbuffer);
_Canvas.Clear(_ClearColor);
_NonPowerOf2TextureSupported = true;
}
public override bool Init()
{
if (!base.Init())
{
return false;
}
_BlankTexture = AddTexture(1, 1, new byte[] { 255, 255, 255, 255 });
return true;
}
public override void Close()
{
base.Close();
_Canvas.Dispose();
_Backbuffer.Dispose();
}
protected override void _DoResize()
{
var clientSize = _GetClientSize();
if (clientSize.Width == 0 || clientSize.Height == 0)
{
return;
}
_CurrentAlignment = CConfig.Config.Graphics.ScreenAlignment;
_W = clientSize.Width;
_H = clientSize.Height;
_X = 0;
_Y = 0;
_AdjustAspect(false);
}
protected override void _AdjustNewBorders() { }
protected override void _OnBeforeDraw() { }
protected override void _OnAfterDraw()
{
var surface = SDL3.SDL_GetWindowSurface(_Window);
if (surface != null)
{
var colorType = surface->format == SDL_PixelFormat.SDL_PIXELFORMAT_ABGR8888 || surface->format == SDL_PixelFormat.SDL_PIXELFORMAT_XBGR8888
? SKColorType.Rgba8888 : SKColorType.Bgra8888;
var info = new SKImageInfo(surface->w, surface->h, colorType, SKAlphaType.Premul);
using (var windowSurface = SKSurface.Create(info, surface->pixels, surface->pitch))
using (var image = SKImage.FromBitmap(_Backbuffer))
{
if (windowSurface != null)
{
windowSurface.Canvas.Clear(SKColors.Black);
windowSurface.Canvas.DrawImage(image, SKRect.Create(_X, _Y, _W, _H), new SKSamplingOptions(SKFilterMode.Linear));
windowSurface.Canvas.Flush();
}
}
SDL3.SDL_UpdateWindowSurface(_Window);
}
_HandleEvents();
}
protected override void _ClearScreen()
{
_Canvas.Clear(_ClearColor);
}
public int GetScreenWidth()
{
return _W;
}
public int GetScreenHeight()
{
return _H;
}
public CTextureRef CopyScreen()
{
var texture = _CreateTexture(new Size(_Backbuffer.Width, _Backbuffer.Height));
_Backbuffer.CopyPixelsTo(texture.Bitmap);
return _GetTextureReference(_Backbuffer.Width, _Backbuffer.Height, texture);
}
public void CopyScreen(ref CTextureRef texture)
{
CSoftwareTexture softwareTexture;
if (!_GetTexture(texture, out softwareTexture) || softwareTexture.DataSize.Width != _Backbuffer.Width || softwareTexture.DataSize.Height != _Backbuffer.Height)
{
RemoveTexture(ref texture);
texture = CopyScreen();
}
else
{
_Backbuffer.CopyPixelsTo(softwareTexture.Bitmap);
}
}
public void MakeScreenShot()
{
var file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.png");
using (var stream = File.Create(file))
{
_Backbuffer.Encode(stream, SKEncodedImageFormat.Png, 100);
}
}
public void DrawRect(SColorF color, SRectF rect, bool allMonitors = true)
{
DrawTexture(_BlankTexture, rect, color, false, allMonitors);
}
public void DrawRectReflection(SColorF color, SRectF rect, float space, float height)
{
DrawTextureReflection(_BlankTexture, rect, color, rect, space, height);
}
protected override CSoftwareTexture _CreateTexture(Size dataSize)
{
return new CSoftwareTexture(dataSize);
}
protected override void _WriteDataToTexture(CSoftwareTexture texture, byte[] data)
{
if (!texture.IsLoaded)
{
return;
}
var length = Math.Min(data.Length, texture.Bitmap.ByteCount);
System.Runtime.InteropServices.Marshal.Copy(data, 0, texture.Bitmap.GetPixels(), length);
texture.Bitmap.NotifyPixelsChanged();
}
protected override void _DrawTexture(CSoftwareTexture texture, SDrawCoords dc, SColorF color, bool isReflection = false)
{
if (!texture.IsLoaded)
{
return;
}
var alpha = color.A * CGraphics.GlobalAlpha;
var width = texture.Bitmap.Width;
var height = texture.Bitmap.Height;
var source = new SKRect(Math.Min(dc.Tx1, dc.Tx2) * width, Math.Min(dc.Ty1, dc.Ty2) * height, Math.Max(dc.Tx1, dc.Tx2) * width,
Math.Max(dc.Ty1, dc.Ty2) * height);
var destination = new SKRect(dc.Wx1, dc.Wy1, dc.Wx2, dc.Wy2);
if (source.Width <= 0 || source.Height <= 0 || destination.Width <= 0 || destination.Height <= 0)
{
return;
}
var matrix = new[]
{
color.R, 0, 0, 0, 0,
0, color.G, 0, 0, 0,
0, 0, color.B, 0, 0,
0, 0, 0, alpha, 0
};
_Canvas.Save();
if (Math.Abs(dc.Rotation) > float.Epsilon)
{
_Canvas.RotateDegrees(dc.Rotation, destination.MidX, destination.MidY);
}
if (dc.Ty1 > dc.Ty2)
{
_Canvas.Scale(1, -1, destination.MidX, destination.MidY);
}
using (var filter = SKColorFilter.CreateColorMatrix(matrix))
using (var paint = new SKPaint { ColorFilter = filter, IsAntialias = true })
{
if (isReflection)
{
using (var mask = SKShader.CreateLinearGradient(new SKPoint(0, dc.Ty1 > dc.Ty2 ? destination.Bottom : destination.Top),
new SKPoint(0, dc.Ty1 > dc.Ty2 ? destination.Top : destination.Bottom), new[] { SKColors.White, SKColors.Transparent }, SKShaderTileMode.Clamp))
using (var maskPaint = new SKPaint { Shader = mask, BlendMode = SKBlendMode.DstIn })
{
_Canvas.SaveLayer(destination, null);
_Canvas.DrawImage(texture.Image, source, destination, new SKSamplingOptions(SKFilterMode.Linear), paint);
_Canvas.DrawRect(destination, maskPaint);
_Canvas.Restore();
}
}
else
{
_Canvas.DrawImage(texture.Image, source, destination, new SKSamplingOptions(SKFilterMode.Linear), paint);
}
}
_Canvas.Restore();
}
}
}
-497
View File
@@ -1,497 +0,0 @@
#region license
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
using Vocaluxe.Base;
using VocaluxeLib;
using VocaluxeLib.Draw;
namespace Vocaluxe.Lib.Draw
{
class CDrawWinForm : Form, IDraw
{
private bool _Run;
private readonly Bitmap _Backbuffer;
private readonly Graphics _G;
private bool _Fullscreen;
private readonly CKeys _Keys;
private readonly CMouse _Mouse;
private FormBorderStyle _BrdStyle;
private bool _TopMost;
private Rectangle _Bounds;
private readonly Dictionary<int, CTextureRef> _Textures = new Dictionary<int, CTextureRef>();
private readonly Dictionary<string, CTextureRef> _TextureCache = new Dictionary<string, CTextureRef>();
private readonly List<Bitmap> _Bitmaps = new List<Bitmap>();
private readonly Color _ClearColor = Color.DarkBlue;
public CDrawWinForm()
{
Icon = new Icon(Path.Combine(CSettings.ProgramFolder, CSettings.FileNameIcon));
_Keys = new CKeys();
_Mouse = new CMouse();
ClientSize = new Size(1280, 720);
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.Opaque, true);
// Create the backbuffer
_Backbuffer = new Bitmap(CSettings.RenderW, CSettings.RenderH);
_G = Graphics.FromImage(_Backbuffer);
_G.Clear(Color.DarkBlue);
Closing += _OnClosingEvent;
KeyDown += _OnKeyDownEvent;
KeyPress += _OnKeyPressEvent;
KeyUp += _OnKeyUpEvent;
Resize += _OnResizeEvent;
MouseMove += _OnMouseMove;
MouseDown += _OnMouseDown;
MouseUp += _OnMouseUp;
_FlipBuffer();
Cursor.Show();
}
private void _FlipBuffer()
{
_DrawBuffer();
_G.Clear(_ClearColor);
}
private void _DrawBuffer()
{
var frontBuffer = Graphics.FromHwnd(Handle);
var h = ClientSize.Height;
var w = ClientSize.Width;
var y = 0;
var x = 0;
if (ClientSize.Width / (float)ClientSize.Height > CSettings.GetRenderAspect())
{
w = (int)Math.Round(ClientSize.Height * CSettings.GetRenderAspect());
x = (ClientSize.Width - w) / 2;
}
else
{
h = (int)Math.Round(ClientSize.Width / CSettings.GetRenderAspect());
y = (ClientSize.Height - h) / 2;
}
frontBuffer.DrawImage(_Backbuffer, new Rectangle(x, y, w, h), new Rectangle(0, 0, _Backbuffer.Width, _Backbuffer.Height), GraphicsUnit.Pixel);
}
#region FullScreenStuff
private void _ToggleFullScreen()
{
if (!_Fullscreen)
{
_Maximize(this);
}
else
{
_Restore(this);
}
}
private void _Maximize(Form targetForm)
{
if (!_Fullscreen)
{
_Save(targetForm);
targetForm.FormBorderStyle = FormBorderStyle.None;
targetForm.Bounds = Screen.PrimaryScreen.Bounds;
targetForm.TopMost = true;
_Fullscreen = true;
}
}
private void _Save(Form targetForm)
{
_BrdStyle = targetForm.FormBorderStyle;
_TopMost = targetForm.TopMost;
_Bounds = targetForm.Bounds;
}
private void _Restore(Form targetForm)
{
targetForm.FormBorderStyle = _BrdStyle;
targetForm.TopMost = _TopMost;
targetForm.Bounds = _Bounds;
_Fullscreen = false;
}
#endregion FullScreenStuff
private void _OnResizeEvent(object sender, EventArgs e)
{
var frontBuffer = Graphics.FromHwnd(Handle);
frontBuffer.Clear(Color.Black);
}
private void _OnClosingEvent(object sender, CancelEventArgs e)
{
_Run = false;
}
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case 0x112: // WM_SYSCOMMAND
switch ((int)m.WParam & 0xFFF0)
{
case 0xF100: // SC_KEYMENU
m.Result = IntPtr.Zero;
break;
case 0xF140: // SC_SCREENSAVER
case 0xF170: // SC_MONITORPOWER
break;
default:
base.WndProc(ref m);
break;
}
break;
default:
base.WndProc(ref m);
break;
}
}
private void _OnKeyDownEvent(object sender, KeyEventArgs e)
{
_Keys.KeyDown(e);
}
private void _OnKeyPressEvent(object sender, KeyPressEventArgs e)
{
_Keys.KeyPress(e);
}
private void _OnKeyUpEvent(object sender, KeyEventArgs e)
{
_Keys.KeyUp(e);
}
#region mouse event handlers
private void _OnMouseMove(object sender, MouseEventArgs e)
{
_Mouse.MouseMove(e);
}
private void _OnMouseDown(object sender, MouseEventArgs e)
{
_Mouse.MouseDown(e);
}
private void _OnMouseUp(object sender, MouseEventArgs e)
{
_Mouse.MouseUp(e);
}
#endregion
public bool Init()
{
Text = CSettings.GetFullVersionText();
return true;
}
public void MainLoop()
{
_Run = true;
var delay = 0;
Show();
if (CConfig.Config.Graphics.FullScreen == EOffOn.TR_CONFIG_ON)
{
_Maximize(this);
}
while (_Run)
{
Application.DoEvents();
if (_Run)
{
ClearScreen();
_Run = _Run && CGraphics.Draw();
_Run = CGraphics.UpdateGameLogic(_Keys, _Mouse);
_FlipBuffer();
if (CConfig.Config.Graphics.FullScreen == EOffOn.TR_CONFIG_ON != _Fullscreen)
{
_ToggleFullScreen();
}
if (CTime.IsRunning())
{
delay = (int)Math.Floor(CConfig.CalcCycleTime() - CTime.GetMilliseconds());
}
if (delay >= 1)
{
Thread.Sleep(delay);
}
CTime.CalculateFPS();
CTime.Restart();
}
}
Close();
}
public new void Close()
{
try
{
base.Close();
}
catch { }
Dispose();
}
public int GetScreenWidth()
{
return ClientSize.Width;
}
public int GetScreenHeight()
{
return ClientSize.Height;
}
public void ClearScreen()
{
_G.Clear(_ClearColor);
}
public CTextureRef CopyScreen()
{
var bmp = new Bitmap(_Backbuffer);
_Bitmaps.Add(bmp);
var texture = _GetNewTexture(bmp.GetSize());
// Add to Texture List
_Textures[texture.Id] = texture;
return texture;
}
public void CopyScreen(ref CTextureRef texture)
{
if (!_TextureExists(texture) || texture.OrigSize.Width != GetScreenWidth() || texture.OrigSize.Height != GetScreenHeight())
{
RemoveTexture(ref texture);
texture = CopyScreen();
}
else
{
_Bitmaps[texture.Id] = new Bitmap(_Backbuffer);
}
}
public void MakeScreenShot()
{
var file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.png");
_Backbuffer.Save(file, ImageFormat.Png);
}
public void DrawRect(SColorF color, SRectF rect, bool allMonitors = true) { }
public void DrawRectReflection(SColorF color, SRectF rect, float space, float height) { }
public CTextureRef AddTexture(Bitmap bmp)
{
var bmp2 = new Bitmap(bmp);
_Bitmaps.Add(bmp2);
var texture = _GetNewTexture(bmp.GetSize());
// Add to Texture List
_Textures[texture.Id] = texture;
return texture;
}
private CTextureRef _GetNewTexture(Size size)
{
return new CTextureRef(_Bitmaps.Count - 1, size);
}
public CTextureRef AddTexture(string texturePath)
{
if (File.Exists(texturePath))
{
CTextureRef texture;
if (_TextureCache.TryGetValue(texturePath, out texture))
{
return texture;
}
using (var bmp = new Bitmap(texturePath))
{
texture = AddTexture(bmp);
_TextureCache.Add(texturePath, texture);
}
return texture;
}
return null;
}
private bool _TextureExists(CTextureRef texture)
{
return texture != null && _Textures.ContainsKey(texture.Id);
}
public CTextureRef CopyTexture(CTextureRef textureRef)
{
if (_TextureExists(textureRef))
{
return AddTexture(_Bitmaps[textureRef.Id]);
}
return null;
}
public void RemoveTexture(ref CTextureRef texture)
{
if (_TextureExists(texture))
{
_Bitmaps[texture.Id].Dispose();
_Textures.Remove(texture.Id);
texture.SetRemoved();
}
texture = null;
}
public CTextureRef EnqueueTexture(int w, int h, byte[] data)
{
return AddTexture(w, h, data);
}
public CTextureRef EnqueueTexture(string texturePath)
{
return AddTexture(texturePath);
}
public CTextureRef EnqueueTexture(Bitmap bmp)
{
return AddTexture(bmp);
}
public void EnqueueTextureUpdate(CTextureRef textureRef, Bitmap bmp)
{
UpdateTexture(textureRef, bmp);
}
public CTextureRef AddTexture(int w, int h, byte[] data)
{
using (var bmp = new Bitmap(w, h))
{
var bmpData = bmp.LockBits(bmp.GetRect(), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
Marshal.Copy(data, 0, bmpData.Scan0, data.Length);
bmp.UnlockBits(bmpData);
return AddTexture(bmp);
}
}
public void UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
{
if (_TextureExists(texture))
{
var bmpData = _Bitmaps[texture.Id].LockBits(new Rectangle(0, 0, _Bitmaps[texture.Id].Width, _Bitmaps[texture.Id].Height),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
Marshal.Copy(data, 0, bmpData.Scan0, data.Length);
_Bitmaps[texture.Id].UnlockBits(bmpData);
}
}
public void UpdateTexture(CTextureRef textureRef, Bitmap bmp)
{
if (_TextureExists(textureRef))
{
_Bitmaps[textureRef.Id] = bmp;
}
}
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false, bool allMonitors = true)
{
if (texture != null)
{
DrawTexture(texture, rect, color, rect, mirrored);
}
}
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false, bool allMonitors = true)
{
if (!_TextureExists(texture))
{
return;
}
var coloredBitmap = _ColorizeBitmap(_Bitmaps[texture.Id], color);
_G.DrawImage(coloredBitmap, new RectangleF(rect.X, rect.Y, rect.W, rect.H));
coloredBitmap.Dispose();
}
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end, bool allMonitors = true) { }
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height, bool allMonitors = true) { }
public int GetTextureCount()
{
return _Textures.Count;
}
private static Bitmap _ColorizeBitmap(Bitmap original, SColorF color)
{
var newBitmap = new Bitmap(original.Width, original.Height);
using (var g = Graphics.FromImage(newBitmap))
{
var cm = new ColorMatrix { Matrix33 = color.A, Matrix00 = color.R, Matrix11 = color.G, Matrix22 = color.B, Matrix44 = 1 };
using (var ia = new ImageAttributes())
{
ia.SetColorMatrix(cm);
g.DrawImage(original, new Rectangle(0, 0, original.Width, original.Height),
0, 0, original.Width, original.Height, GraphicsUnit.Pixel, ia);
}
}
return newBitmap;
}
}
}
+472 -310
View File
@@ -16,46 +16,30 @@
#endregion
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Windows.Forms;
using System.Numerics;
using System.Runtime.InteropServices;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using OpenTK.Graphics.OpenGL4;
using SDL;
using SkiaSharp;
using Vocaluxe.Base;
using VocaluxeLib;
using VocaluxeLib.Draw;
using BlendingFactorDest = OpenTK.Graphics.OpenGL.BlendingFactorDest;
using BlendingFactorSrc = OpenTK.Graphics.OpenGL.BlendingFactorSrc;
using ClearBufferMask = OpenTK.Graphics.OpenGL.ClearBufferMask;
using DepthFunction = OpenTK.Graphics.OpenGL.DepthFunction;
using EnableCap = OpenTK.Graphics.OpenGL.EnableCap;
using GL = OpenTK.Graphics.OpenGL.GL;
using GenerateMipmapTarget = OpenTK.Graphics.OpenGL.GenerateMipmapTarget;
using MatrixMode = OpenTK.Graphics.OpenGL.MatrixMode;
using PixelFormat = OpenTK.Graphics.OpenGL.PixelFormat;
using PixelInternalFormat = OpenTK.Graphics.OpenGL.PixelInternalFormat;
using PixelStoreParameter = OpenTK.Graphics.OpenGL.PixelStoreParameter;
using PixelType = OpenTK.Graphics.OpenGL.PixelType;
using TextureMagFilter = OpenTK.Graphics.OpenGL.TextureMagFilter;
using TextureMinFilter = OpenTK.Graphics.OpenGL.TextureMinFilter;
using TextureParameterName = OpenTK.Graphics.OpenGL.TextureParameterName;
using TextureTarget = OpenTK.Graphics.OpenGL.TextureTarget;
using VocaluxeLib.Log;
using PixelFormat = OpenTK.Graphics.OpenGL4.PixelFormat;
using Size = System.Drawing.Size;
namespace Vocaluxe.Lib.Draw
{
class CFormHook : Form, IFormHook
class CSdlBindingsContext : IBindingsContext
{
public MessageEventHandler OnMessage { private get; set; }
protected override void WndProc(ref Message m)
public IntPtr GetProcAddress(string procName)
{
if (OnMessage == null || OnMessage(ref m))
{
base.WndProc(ref m);
}
return SDL3.SDL_GL_GetProcAddress(procName);
}
}
@@ -63,6 +47,7 @@ namespace Vocaluxe.Lib.Draw
{
//The texture "name" according to the specs
public readonly int Name;
public int[] Planes;
public COGLTexture(int name, Size dataSize, int texWidth = 0, int texHeight = 0) : base(dataSize, new Size(texWidth, texHeight))
{
@@ -74,10 +59,10 @@ namespace Vocaluxe.Lib.Draw
GL.BindTexture(TextureTarget.Texture2D, Name);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, texWidth, texHeight, 0, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba8, texWidth, texHeight, 0, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)OpenTK.Graphics.TextureWrapMode.ClampToEdge);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)OpenTK.Graphics.TextureWrapMode.ClampToEdge);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.ClampToEdge);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.ClampToEdge);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
@@ -97,6 +82,11 @@ namespace Vocaluxe.Lib.Draw
}
base.Dispose();
if (Planes != null)
{
GL.DeleteTextures(Planes.Length, Planes);
}
if (Name != 0)
{
GL.DeleteTexture(Name);
@@ -104,146 +94,130 @@ namespace Vocaluxe.Lib.Draw
}
}
class COpenGL : CDrawBaseWindows<COGLTexture>, IDraw
unsafe class COpenGL : CDrawBaseSDL<COGLTexture>, IDraw
{
private readonly GLControl _Control;
private const string _VertexShaderSource = @"#version 330 core
uniform mat4 Projection;
layout(location = 0) in vec3 Position;
layout(location = 1) in vec2 TexCoord;
layout(location = 2) in vec4 Color;
out vec2 vTexCoord;
out vec4 vColor;
void main()
{
gl_Position = Projection * vec4(Position, 1.0);
vTexCoord = TexCoord;
vColor = Color.bgra;
}";
private const string _YuvVertexShaderSource = @"#version 330 core
void main()
{
vec2 position = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2);
gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);
}";
private const string _YuvFragmentShaderSource = @"#version 330 core
uniform sampler2D TexY;
uniform sampler2D TexU;
uniform sampler2D TexV;
uniform vec4 RowR;
uniform vec4 RowG;
uniform vec4 RowB;
uniform vec2 Size;
out vec4 FragColor;
void main()
{
vec2 uv = gl_FragCoord.xy / Size;
vec4 yuv = vec4(texture(TexY, uv).r, texture(TexU, uv).r, texture(TexV, uv).r, 1.0);
FragColor = vec4(clamp(dot(RowR, yuv), 0.0, 1.0), clamp(dot(RowG, yuv), 0.0, 1.0), clamp(dot(RowB, yuv), 0.0, 1.0), 1.0);
}";
private const string _FragmentShaderSource = @"#version 330 core
uniform sampler2D Tex;
in vec2 vTexCoord;
in vec4 vColor;
out vec4 FragColor;
void main()
{
FragColor = texture(Tex, vTexCoord) * vColor;
}";
private readonly SDL_GLContextState* _Context;
private int _FBO;
private int _ResolveFBO;
private int _ResolveTexture;
private Size _ResolveSize;
private int _Program;
private int _YuvProgram;
private int _ProjectionLocation;
private int _VertexArray;
private int _VertexBuffer;
private int _IndexBuffer;
private CTextureRef _BlankTexture;
private readonly List<STexturedColoredVertex> _Vertices = new List<STexturedColoredVertex>();
private readonly List<int> _VerticesTextures = new List<int>();
public COpenGL()
{
_Form = new CFormHook { ClientSize = new Size(CConfig.Config.Graphics.ScreenW * CConfig.Config.Graphics.NumScreens, CConfig.Config.Graphics.ScreenH) };
//OpenGL needs that here but D3D needs it in the constructor, so do NOT unify!
//Check AA Mode
CConfig.Config.Graphics.AAMode = (EAntiAliasingModes)_CheckAntiAliasingMode((int)CConfig.Config.Graphics.AAMode);
var ok = false;
try
var samples = (int)CConfig.Config.Graphics.AAMode;
if (samples > 16)
{
#if WIN
var gm = new GraphicsMode(32, 24, 0, (int)CConfig.Config.Graphics.AAMode);
#else
var gm = new GraphicsMode(24, 24, 0, (int)CConfig.Config.Graphics.AAMode);
#endif
_Control = new GLControl(gm, 2, 1, GraphicsContextFlags.Default);
if (_Control.GraphicsMode != null)
{
ok = true;
}
}
catch (Exception)
{
ok = false;
samples = 16;
}
if (!ok)
_SetAttributes(samples);
if (!_CreateWindow(SDL_WindowFlags.SDL_WINDOW_OPENGL) && samples > 0)
{
_Control = new GLControl();
samples = 0;
_SetAttributes(samples);
_CreateWindow(SDL_WindowFlags.SDL_WINDOW_OPENGL);
}
_Control.MakeCurrent();
_Control.VSync = CConfig.Config.Graphics.VSync == EOffOn.TR_CONFIG_ON;
if (_Window == null)
{
throw new Exception("Could not create an OpenGL window: " + SDL3.SDL_GetError());
}
_Form.Controls.Add(_Control);
_Control.ClientSize = _Form.ClientSize;
CConfig.Config.Graphics.AAMode = (EAntiAliasingModes)samples;
_Control.KeyDown += _OnKeyDown;
_Control.PreviewKeyDown += _OnPreviewKeyDown;
_Control.KeyPress += _OnKeyPress;
_Control.KeyUp += _OnKeyUp;
_Context = SDL3.SDL_GL_CreateContext(_Window);
if (_Context == null)
{
throw new Exception("Could not create an OpenGL 3.3 context: " + SDL3.SDL_GetError());
}
_Control.MouseMove += _OnMouseMove;
_Control.MouseWheel += _OnMouseWheel;
_Control.MouseDown += _OnMouseDown;
_Control.MouseUp += _OnMouseUp;
_Control.MouseLeave += _OnMouseLeave;
_Control.MouseEnter += _OnMouseEnter;
SDL3.SDL_GL_MakeCurrent(_Window, _Context);
GL.LoadBindings(new CSdlBindingsContext());
SDL3.SDL_GL_SetSwapInterval(CConfig.Config.Graphics.VSync == EOffOn.TR_CONFIG_ON ? 1 : 0);
_NonPowerOf2TextureSupported = false;
_NonPowerOf2TextureSupported = true;
}
private static int _CheckAntiAliasingMode(int setValue)
private static void _SetAttributes(int samples)
{
var samples = 0;
if (setValue > 32)
{
setValue = 32;
}
while (samples <= setValue)
{
GraphicsMode mode;
try
{
mode = new GraphicsMode(16, 0, 0, samples);
}
catch (Exception)
{
break;
}
if (mode.Samples != samples)
{
break;
}
if (samples == 0)
{
samples = 2;
}
else
{
samples *= 2;
}
}
if (samples == 2)
{
return 0;
}
return samples / 2;
}
/*
private int _CheckColorDepth(int setValue)
{
int result = 16;
if (setValue > 32)
setValue = 32;
while (result <= setValue)
{
GraphicsMode mode;
try
{
mode = new GraphicsMode(result, 0, 0, 0);
}
catch (Exception)
{
break;
}
if (mode.ColorFormat != result)
break;
result += 8;
}
return result - 8;
}
*/
protected override void _OnResize(object sender, EventArgs e)
{
_Control.ClientSize = _Form.ClientSize;
base._OnResize(sender, e);
SDL3.SDL_GL_ResetAttributes();
SDL3.SDL_GL_SetAttribute(SDL_GLAttr.SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL3.SDL_GL_SetAttribute(SDL_GLAttr.SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL3.SDL_GL_SetAttribute(SDL_GLAttr.SDL_GL_CONTEXT_PROFILE_MASK, SDL3.SDL_GL_CONTEXT_PROFILE_CORE);
SDL3.SDL_GL_SetAttribute(SDL_GLAttr.SDL_GL_CONTEXT_FLAGS, SDL3.SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG);
SDL3.SDL_GL_SetAttribute(SDL_GLAttr.SDL_GL_DOUBLEBUFFER, 1);
SDL3.SDL_GL_SetAttribute(SDL_GLAttr.SDL_GL_DEPTH_SIZE, 24);
SDL3.SDL_GL_SetAttribute(SDL_GLAttr.SDL_GL_MULTISAMPLEBUFFERS, samples > 0 ? 1 : 0);
SDL3.SDL_GL_SetAttribute(SDL_GLAttr.SDL_GL_MULTISAMPLESAMPLES, samples);
}
protected override void _DoResize()
{
_H = _Control.Height;
_W = _Control.Width;
var clientSize = _GetClientSize();
if (clientSize.Width == 0 || clientSize.Height == 0)
{
return;
}
_H = clientSize.Height;
_W = clientSize.Width;
_X = 0;
_Y = 0;
_CurrentAlignment = CConfig.Config.Graphics.ScreenAlignment;
if (CConfig.Config.Graphics.Stretch != EOffOn.TR_CONFIG_ON)
@@ -262,47 +236,165 @@ namespace Vocaluxe.Lib.Draw
return false;
}
// Init Texturing
GL.Enable(EnableCap.Texture2D);
try
{
_Program = _CreateProgram(_VertexShaderSource, _FragmentShaderSource);
}
catch (Exception e)
{
CLog.Error(e, "Error during OpenGL initialization.");
return false;
}
GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
try
{
_YuvProgram = _CreateProgram(_YuvVertexShaderSource, _YuvFragmentShaderSource);
GL.UseProgram(_YuvProgram);
GL.Uniform1(GL.GetUniformLocation(_YuvProgram, "TexY"), 0);
GL.Uniform1(GL.GetUniformLocation(_YuvProgram, "TexU"), 1);
GL.Uniform1(GL.GetUniformLocation(_YuvProgram, "TexV"), 2);
}
catch (Exception e)
{
CLog.Error(e, "[OpenGL] Unable to compile the YUV shader, using CPU conversion for videos");
_YuvProgram = 0;
}
_ProjectionLocation = GL.GetUniformLocation(_Program, "Projection");
GL.UseProgram(_Program);
GL.Uniform1(GL.GetUniformLocation(_Program, "Tex"), 0);
_VertexArray = GL.GenVertexArray();
GL.BindVertexArray(_VertexArray);
var vertexSize = Marshal.SizeOf<STexturedColoredVertex>();
_VertexBuffer = GL.GenBuffer();
GL.BindBuffer(BufferTarget.ArrayBuffer, _VertexBuffer);
GL.BufferData(BufferTarget.ArrayBuffer, CSettings.VertexBufferElements * 4 * vertexSize, IntPtr.Zero, BufferUsageHint.StreamDraw);
GL.VertexAttribPointer(0, 3, VertexAttribPointerType.Float, false, vertexSize, 0);
GL.VertexAttribPointer(1, 2, VertexAttribPointerType.Float, false, vertexSize, sizeof(float) * 3);
GL.VertexAttribPointer(2, 4, VertexAttribPointerType.UnsignedByte, true, vertexSize, sizeof(float) * 5);
GL.EnableVertexAttribArray(0);
GL.EnableVertexAttribArray(1);
GL.EnableVertexAttribArray(2);
var indices = new ushort[CSettings.VertexBufferElements * 6];
for (var i = 0; i < CSettings.VertexBufferElements; i++)
{
var vertex = (ushort)(i * 4);
indices[i * 6] = vertex;
indices[i * 6 + 1] = (ushort)(vertex + 1);
indices[i * 6 + 2] = (ushort)(vertex + 2);
indices[i * 6 + 3] = vertex;
indices[i * 6 + 4] = (ushort)(vertex + 2);
indices[i * 6 + 5] = (ushort)(vertex + 3);
}
_IndexBuffer = GL.GenBuffer();
GL.BindBuffer(BufferTarget.ElementArrayBuffer, _IndexBuffer);
GL.BufferData(BufferTarget.ElementArrayBuffer, indices.Length * sizeof(ushort), indices, BufferUsageHint.StaticDraw);
GL.Enable(EnableCap.Blend);
GL.BlendFuncSeparate(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha, BlendingFactorSrc.Zero, BlendingFactorDest.One);
GL.PixelStore(PixelStoreParameter.UnpackAlignment, 1);
GL.DepthRange(CSettings.ZFar, CSettings.ZNear);
GL.DepthFunc(DepthFunction.Lequal);
GL.Enable(EnableCap.DepthTest);
GL.ClearColor(Color.Black);
GL.ClearColor(0f, 0f, 0f, 1f);
GL.GenFramebuffers(1, out _FBO);
_FBO = GL.GenFramebuffer();
_ResolveFBO = GL.GenFramebuffer();
_BlankTexture = AddTexture(1, 1, new byte[] { 255, 255, 255, 255 });
return true;
}
private static int _CreateProgram(string vertexShaderSource, string fragmentShaderSource)
{
var vertexShader = _CompileShader(ShaderType.VertexShader, vertexShaderSource);
var fragmentShader = _CompileShader(ShaderType.FragmentShader, fragmentShaderSource);
var program = GL.CreateProgram();
GL.AttachShader(program, vertexShader);
GL.AttachShader(program, fragmentShader);
GL.LinkProgram(program);
GL.DeleteShader(vertexShader);
GL.DeleteShader(fragmentShader);
int status;
GL.GetProgram(program, GetProgramParameterName.LinkStatus, out status);
if (status == 0)
{
throw new Exception("Shader linking failed: " + GL.GetProgramInfoLog(program));
}
return program;
}
private static int _CompileShader(ShaderType type, string source)
{
var shader = GL.CreateShader(type);
GL.ShaderSource(shader, source);
GL.CompileShader(shader);
int status;
GL.GetShader(shader, ShaderParameter.CompileStatus, out status);
if (status == 0)
{
throw new Exception("Shader compilation failed: " + GL.GetShaderInfoLog(shader));
}
return shader;
}
public override void Close()
{
base.Close();
GL.DeleteFramebuffers(1, ref _FBO);
if (_Context == null)
{
return;
}
GL.DeleteFramebuffer(_FBO);
GL.DeleteFramebuffer(_ResolveFBO);
if (_ResolveTexture != 0)
{
GL.DeleteTexture(_ResolveTexture);
}
GL.DeleteBuffer(_VertexBuffer);
GL.DeleteBuffer(_IndexBuffer);
GL.DeleteVertexArray(_VertexArray);
GL.DeleteProgram(_Program);
if (_YuvProgram != 0)
{
GL.DeleteProgram(_YuvProgram);
}
SDL3.SDL_GL_DestroyContext(_Context);
}
protected override void _OnBeforeDraw()
{
//Nothing to do
GL.UseProgram(_Program);
GL.BindVertexArray(_VertexArray);
GL.ActiveTexture(TextureUnit.Texture0);
}
protected override void _OnAfterDraw()
{
_Control.SwapBuffers();
Application.DoEvents();
_RenderVertexBuffer();
SDL3.SDL_GL_SwapWindow(_Window);
_HandleEvents();
}
public int GetScreenWidth()
{
return _Control.Width;
return _GetClientSize().Width;
}
public int GetScreenHeight()
{
return _Control.Height;
return _GetClientSize().Height;
}
protected override void _ClearScreen()
@@ -312,41 +404,91 @@ namespace Vocaluxe.Lib.Draw
protected override void _AdjustNewBorders()
{
GL.MatrixMode(MatrixMode.Projection);
GL.LoadIdentity();
GL.Ortho(-CConfig.Config.Graphics.BorderLeft, CConfig.Config.Graphics.BorderRight + CSettings.RenderW * CConfig.Config.Graphics.NumScreens,
CConfig.Config.Graphics.BorderBottom + CSettings.RenderH,
-CConfig.Config.Graphics.BorderTop, CSettings.ZNear, CSettings.ZFar);
float left = -CConfig.Config.Graphics.BorderLeft;
float right = CConfig.Config.Graphics.BorderRight + CSettings.RenderW * CConfig.Config.Graphics.NumScreens;
float bottom = CConfig.Config.Graphics.BorderBottom + CSettings.RenderH;
float top = -CConfig.Config.Graphics.BorderTop;
float zNear = CSettings.ZNear;
float zFar = CSettings.ZFar;
var projection = new Matrix4x4(
2f / (right - left), 0f, 0f, 0f,
0f, 2f / (top - bottom), 0f, 0f,
0f, 0f, 2f / (zFar - zNear), 0f,
-(right + left) / (right - left), -(top + bottom) / (top - bottom), -(zFar + zNear) / (zFar - zNear), 1f);
GL.UseProgram(_Program);
GL.UniformMatrix4(_ProjectionLocation, 1, false, &projection.M11);
}
public void MakeScreenShot()
{
_RenderVertexBuffer();
var file = CHelper.GetUniqueFileName(Path.Combine(CSettings.DataFolder, CSettings.FolderNameScreenshots), "Screenshot.png");
var width = GetScreenWidth();
var height = GetScreenHeight();
using (var screen = new Bitmap(width, height))
var size = _GetClientSize();
using (var screen = new SKBitmap(new SKImageInfo(size.Width, size.Height, SKColorType.Bgra8888, SKAlphaType.Opaque)))
{
var bmpData = screen.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
var pixels = new byte[size.Width * size.Height * 4];
GL.PixelStore(PixelStoreParameter.PackAlignment, 1);
GL.ReadPixels(0, 0, size.Width, size.Height, PixelFormat.Bgra, PixelType.UnsignedByte, pixels);
GL.ReadPixels(0, 0, width, height, PixelFormat.Bgra, PixelType.UnsignedByte, bmpData.Scan0);
screen.UnlockBits(bmpData);
var rowLength = size.Width * 4;
var target = screen.GetPixels();
for (var y = 0; y < size.Height; y++)
{
Marshal.Copy(pixels, (size.Height - 1 - y) * rowLength, IntPtr.Add(target, y * screen.RowBytes), rowLength);
}
screen.RotateFlip(RotateFlipType.RotateNoneFlipY);
screen.Save(file, ImageFormat.Png);
using (var stream = File.Create(file))
{
screen.Encode(stream, SKEncodedImageFormat.Png, 100);
}
}
}
private void _CopyFrameToTexture(COGLTexture texture)
{
_RenderVertexBuffer();
if (_ResolveTexture == 0 || _ResolveSize.Width != _W || _ResolveSize.Height != _H)
{
if (_ResolveTexture != 0)
{
GL.DeleteTexture(_ResolveTexture);
}
_ResolveSize = new Size(_W, _H);
_ResolveTexture = GL.GenTexture();
GL.BindTexture(TextureTarget.Texture2D, _ResolveTexture);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba8, _W, _H, 0, PixelFormat.Bgra, PixelType.UnsignedByte, IntPtr.Zero);
GL.BindTexture(TextureTarget.Texture2D, 0);
GL.BindFramebuffer(FramebufferTarget.Framebuffer, _ResolveFBO);
GL.FramebufferTexture2D(FramebufferTarget.Framebuffer, FramebufferAttachment.ColorAttachment0, TextureTarget.Texture2D, _ResolveTexture, 0);
}
var width = Math.Min(_W, texture.Size.Width);
var height = Math.Min(_H, texture.Size.Height);
GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, 0);
GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, _ResolveFBO);
GL.BlitFramebuffer(_X, _Y, _X + _W, _Y + _H, 0, 0, _W, _H, ClearBufferMask.ColorBufferBit, BlitFramebufferFilter.Nearest);
GL.BindFramebuffer(FramebufferTarget.Framebuffer, _FBO);
GL.FramebufferTexture2D(FramebufferTarget.Framebuffer, FramebufferAttachment.ColorAttachment0, TextureTarget.Texture2D, texture.Name, 0);
GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, _ResolveFBO);
GL.BlitFramebuffer(0, _H - height, width, _H, 0, height, width, 0, ClearBufferMask.ColorBufferBit, BlitFramebufferFilter.Nearest);
GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0);
GL.BindTexture(TextureTarget.Texture2D, texture.Name);
GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
GL.BindTexture(TextureTarget.Texture2D, 0);
}
public CTextureRef CopyScreen()
{
//TODO: Check if _W,_H needs to be used or not
var size = new Size(GetScreenWidth(), GetScreenHeight());
var size = new Size(_W, _H);
var texture = _CreateTexture(size);
GL.BindTexture(TextureTarget.Texture2D, texture.Name);
GL.CopyTexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, 0, 0, size.Width, size.Height); //TODO: Use _X,_Y and _W,_H?
GL.BindTexture(TextureTarget.Texture2D, 0);
_CopyFrameToTexture(texture);
return _GetTextureReference(size, texture);
}
@@ -355,113 +497,25 @@ namespace Vocaluxe.Lib.Draw
{
COGLTexture texture;
//Check for actual texture sizes as it may be downsized compared to OrigSize
if (!_GetTexture(textureRef, out texture) || texture.DataSize.Width != GetScreenWidth() || texture.DataSize.Height != GetScreenHeight())
if (!_GetTexture(textureRef, out texture) || texture.DataSize.Width != _W || texture.DataSize.Height != _H)
{
RemoveTexture(ref textureRef);
textureRef = CopyScreen();
}
else
{
GL.BindTexture(TextureTarget.Texture2D, texture.Name);
GL.CopyTexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, 0, 0, GetScreenWidth(), GetScreenHeight());
GL.BindTexture(TextureTarget.Texture2D, 0);
_CopyFrameToTexture(texture);
}
}
public void DrawRect(SColorF color, SRectF rect, bool allMonitors = true)
{
var loops = 1;
if (allMonitors)
{
loops = CConfig.Config.Graphics.NumScreens;
}
for (var i = 0; i < loops; i++)
{
var newrect = rect;
newrect.X += CSettings.RenderW * i;
GL.Enable(EnableCap.Blend);
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
GL.Begin(PrimitiveType.Quads);
GL.MatrixMode(MatrixMode.Color);
GL.PushMatrix();
if (Math.Abs(newrect.Rotation) > 0.001)
{
GL.Translate(0.5f, 0.5f, 0);
GL.Rotate(-newrect.Rotation, 0f, 0f, 1f);
GL.Translate(-0.5f, -0.5f, 0);
}
GL.Vertex3(newrect.X, newrect.Y, newrect.Z + CGraphics.ZOffset);
GL.Vertex3(newrect.X, newrect.Y + newrect.H, newrect.Z + CGraphics.ZOffset);
GL.Vertex3(newrect.X + newrect.W, newrect.Y + newrect.H, newrect.Z + CGraphics.ZOffset);
GL.Vertex3(newrect.X + newrect.W, newrect.Y, newrect.Z + CGraphics.ZOffset);
GL.End();
GL.PopMatrix();
GL.Disable(EnableCap.Blend);
}
DrawTexture(_BlankTexture, rect, color, false, allMonitors);
}
public void DrawRectReflection(SColorF color, SRectF rect, float space, float height)
{
if (rect.H < height)
{
height = rect.H;
}
var rx1 = rect.X;
var rx2 = rect.X + rect.W;
var ry1 = rect.Y + rect.H + space;
var ry2 = rect.Y + rect.H + space + height;
if (rx1 < rect.X)
{
rx1 = rect.X;
}
if (rx2 > rect.X + rect.W)
{
rx2 = rect.X + rect.W;
}
if (ry1 < rect.Y + space)
{
ry1 = rect.Y + space;
}
if (ry2 > rect.Y + rect.H + space + height)
{
ry2 = rect.Y + rect.H + space + height;
}
GL.Enable(EnableCap.Blend);
GL.MatrixMode(MatrixMode.Color);
GL.PushMatrix();
if (Math.Abs(rect.Rotation) > 0.001)
{
GL.Translate(0.5f, 0.5f, 0);
GL.Rotate(-rect.Rotation, 0f, 0f, 1f);
GL.Translate(-0.5f, -0.5f, 0);
}
GL.Begin(PrimitiveType.Quads);
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
GL.Vertex3(rx2, ry1, rect.Z + CGraphics.ZOffset);
GL.Color4(color.R, color.G, color.B, 0f);
GL.Vertex3(rx2, ry2, rect.Z + CGraphics.ZOffset);
GL.Vertex3(rx1, ry2, rect.Z + CGraphics.ZOffset);
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
GL.Vertex3(rx1, ry1, rect.Z + CGraphics.ZOffset);
GL.End();
GL.PopMatrix();
GL.Disable(EnableCap.Blend);
DrawTextureReflection(_BlankTexture, rect, color, rect, space, height);
}
protected override COGLTexture _CreateTexture(Size dataSize)
@@ -483,13 +537,90 @@ namespace Vocaluxe.Lib.Draw
return;
}
GL.BindFramebuffer(OpenTK.Graphics.OpenGL.FramebufferTarget.Framebuffer, _FBO);
GL.FramebufferTexture2D(OpenTK.Graphics.OpenGL.FramebufferTarget.Framebuffer, OpenTK.Graphics.OpenGL.FramebufferAttachment.ColorAttachment0, TextureTarget.Texture2D,
texture.Name, 0);
GL.ClearColor(Color.FromArgb(0));
GL.BindFramebuffer(FramebufferTarget.Framebuffer, _FBO);
GL.FramebufferTexture2D(FramebufferTarget.Framebuffer, FramebufferAttachment.ColorAttachment0, TextureTarget.Texture2D, texture.Name, 0);
GL.ClearColor(0f, 0f, 0f, 0f);
GL.Clear(ClearBufferMask.ColorBufferBit);
GL.ClearColor(Color.Black);
GL.BindFramebuffer(OpenTK.Graphics.OpenGL.FramebufferTarget.Framebuffer, 0);
GL.ClearColor(0f, 0f, 0f, 1f);
GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0);
}
public override bool SupportsYuvVideo
{
get { return _YuvProgram != 0; }
}
protected override void _WriteYuvDataToTexture(COGLTexture texture, byte[] data, float[] yuvToRgbRows)
{
if (!texture.IsLoaded)
{
return;
}
var width = texture.DataSize.Width;
var height = texture.DataSize.Height;
var planeWidths = new[] { width, (width + 1) / 2, (width + 1) / 2 };
var planeHeights = new[] { height, (height + 1) / 2, (height + 1) / 2 };
if (texture.Planes == null)
{
texture.Planes = new int[3];
GL.GenTextures(3, texture.Planes);
for (var i = 0; i < 3; i++)
{
GL.BindTexture(TextureTarget.Texture2D, texture.Planes[i]);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.R8, planeWidths[i], planeHeights[i], 0, PixelFormat.Red, PixelType.UnsignedByte, IntPtr.Zero);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.ClampToEdge);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.ClampToEdge);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
}
}
fixed (byte* source = data)
{
var offset = 0;
for (var i = 0; i < 3; i++)
{
GL.BindTexture(TextureTarget.Texture2D, texture.Planes[i]);
GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, planeWidths[i], planeHeights[i], PixelFormat.Red, PixelType.UnsignedByte, (IntPtr)(source + offset));
offset += planeWidths[i] * planeHeights[i];
}
}
GL.BindFramebuffer(FramebufferTarget.Framebuffer, _FBO);
GL.FramebufferTexture2D(FramebufferTarget.Framebuffer, FramebufferAttachment.ColorAttachment0, TextureTarget.Texture2D, texture.Name, 0);
GL.Viewport(0, 0, width, height);
GL.Disable(EnableCap.Blend);
GL.Disable(EnableCap.DepthTest);
GL.UseProgram(_YuvProgram);
GL.Uniform4(GL.GetUniformLocation(_YuvProgram, "RowR"), yuvToRgbRows[0], yuvToRgbRows[1], yuvToRgbRows[2], yuvToRgbRows[3]);
GL.Uniform4(GL.GetUniformLocation(_YuvProgram, "RowG"), yuvToRgbRows[4], yuvToRgbRows[5], yuvToRgbRows[6], yuvToRgbRows[7]);
GL.Uniform4(GL.GetUniformLocation(_YuvProgram, "RowB"), yuvToRgbRows[8], yuvToRgbRows[9], yuvToRgbRows[10], yuvToRgbRows[11]);
GL.Uniform2(GL.GetUniformLocation(_YuvProgram, "Size"), (float)width, height);
for (var i = 0; i < 3; i++)
{
GL.ActiveTexture(TextureUnit.Texture0 + i);
GL.BindTexture(TextureTarget.Texture2D, texture.Planes[i]);
}
GL.BindVertexArray(_VertexArray);
GL.DrawArrays(PrimitiveType.Triangles, 0, 3);
for (var i = 2; i >= 0; i--)
{
GL.ActiveTexture(TextureUnit.Texture0 + i);
GL.BindTexture(TextureTarget.Texture2D, 0);
}
GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0);
GL.Viewport(_X, _Y, _W, _H);
GL.Enable(EnableCap.Blend);
GL.Enable(EnableCap.DepthTest);
GL.UseProgram(_Program);
GL.BindTexture(TextureTarget.Texture2D, texture.Name);
GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
GL.BindTexture(TextureTarget.Texture2D, 0);
}
protected override void _WriteDataToTexture(COGLTexture texture, byte[] data)
@@ -499,7 +630,7 @@ namespace Vocaluxe.Lib.Draw
GL.BindTexture(TextureTarget.Texture2D, texture.Name);
GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, texture.DataSize.Width, texture.DataSize.Height, PixelFormat.Bgra, PixelType.UnsignedByte, data);
GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D);
GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
GL.BindTexture(TextureTarget.Texture2D, 0);
}
@@ -511,7 +642,7 @@ namespace Vocaluxe.Lib.Draw
GL.BindTexture(TextureTarget.Texture2D, texture.Name);
GL.TexSubImage2D(TextureTarget.Texture2D, 0, 0, 0, texture.DataSize.Width, texture.DataSize.Height, PixelFormat.Bgra, PixelType.UnsignedByte, data);
GL.Ext.GenerateMipmap(GenerateMipmapTarget.Texture2D);
GL.GenerateMipmap(GenerateMipmapTarget.Texture2D);
GL.BindTexture(TextureTarget.Texture2D, 0);
}
@@ -524,51 +655,82 @@ namespace Vocaluxe.Lib.Draw
dc.Wx2 = (float)Math.Round(dc.Wx2);
dc.Wy2 = (float)Math.Round(dc.Wy2);
GL.BindTexture(TextureTarget.Texture2D, texture.Name);
GL.Enable(EnableCap.Blend);
GL.MatrixMode(MatrixMode.Texture);
GL.PushMatrix();
color.A *= CGraphics.GlobalAlpha;
var c = color.AsColor().ToArgb();
var c2 = c;
if (isReflection)
{
color.A = 0;
c2 = color.AsColor().ToArgb();
}
var rotation = Matrix4x4.Identity;
if (Math.Abs(dc.Rotation) > float.Epsilon)
{
GL.Translate(0.5f, 0.5f, 0);
GL.Rotate(-dc.Rotation, 0f, 0f, 1f);
GL.Translate(-0.5f, -0.5f, 0);
var center = new Vector3((dc.Wx1 + dc.Wx2) / 2f, (dc.Wy1 + dc.Wy2) / 2f, 0);
rotation = Matrix4x4.CreateTranslation(-center) * Matrix4x4.CreateRotationZ(dc.Rotation * (float)Math.PI / 180) * Matrix4x4.CreateTranslation(center);
}
GL.Begin(PrimitiveType.Quads);
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
GL.TexCoord2(dc.Tx1, dc.Ty1);
GL.Vertex3(dc.Wx1, dc.Wy1, dc.Wz);
if (isReflection)
if (_Vertices.Count >= CSettings.VertexBufferElements)
{
GL.Color4(color.R, color.G, color.B, 0);
_RenderVertexBuffer();
}
GL.TexCoord2(dc.Tx1, dc.Ty2);
GL.Vertex3(dc.Wx1, dc.Wy2, dc.Wz);
_Vertices.Add(new STexturedColoredVertex(Vector3.Transform(new Vector3(dc.Wx1, dc.Wy1, dc.Wz), rotation), new Vector2(dc.Tx1, dc.Ty1), c));
_Vertices.Add(new STexturedColoredVertex(Vector3.Transform(new Vector3(dc.Wx1, dc.Wy2, dc.Wz), rotation), new Vector2(dc.Tx1, dc.Ty2), c2));
_Vertices.Add(new STexturedColoredVertex(Vector3.Transform(new Vector3(dc.Wx2, dc.Wy2, dc.Wz), rotation), new Vector2(dc.Tx2, dc.Ty2), c2));
_Vertices.Add(new STexturedColoredVertex(Vector3.Transform(new Vector3(dc.Wx2, dc.Wy1, dc.Wz), rotation), new Vector2(dc.Tx2, dc.Ty1), c));
_VerticesTextures.Add(texture.Name);
}
GL.TexCoord2(dc.Tx2, dc.Ty2);
GL.Vertex3(dc.Wx2, dc.Wy2, dc.Wz);
if (isReflection)
private void _RenderVertexBuffer()
{
if (_Vertices.Count <= 0)
{
GL.Color4(color.R, color.G, color.B, color.A * CGraphics.GlobalAlpha);
return;
}
GL.TexCoord2(dc.Tx2, dc.Ty1);
GL.Vertex3(dc.Wx2, dc.Wy1, dc.Wz);
var vertexData = MemoryMarshal.AsBytes(CollectionsMarshal.AsSpan(_Vertices));
GL.BindBuffer(BufferTarget.ArrayBuffer, _VertexBuffer);
fixed (byte* data = vertexData)
{
GL.BufferSubData(BufferTarget.ArrayBuffer, IntPtr.Zero, vertexData.Length, (IntPtr)data);
}
GL.End();
var quads = _VerticesTextures.Count;
var start = 0;
while (start < quads)
{
var texture = _VerticesTextures[start];
var end = start + 1;
while (end < quads && _VerticesTextures[end] == texture)
{
end++;
}
GL.PopMatrix();
GL.BindTexture(TextureTarget.Texture2D, texture);
GL.DrawElements(PrimitiveType.Triangles, (end - start) * 6, DrawElementsType.UnsignedShort, start * 6 * sizeof(ushort));
start = end;
}
GL.Disable(EnableCap.Blend);
GL.BindTexture(TextureTarget.Texture2D, 0);
_Vertices.Clear();
_VerticesTextures.Clear();
}
[StructLayout(LayoutKind.Sequential)]
private struct STexturedColoredVertex
{
private Vector3 _Position;
private Vector2 _Texture;
private readonly int _Color;
public STexturedColoredVertex(Vector3 position, Vector2 texture, int color)
{
_Position = position;
_Texture = texture;
_Color = color;
}
}
}
}
}
+56 -22
View File
@@ -19,12 +19,12 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using SkiaSharp;
using Vocaluxe.Base;
using VocaluxeLib;
using VocaluxeLib.Draw;
@@ -63,7 +63,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="textureOrRef">TTextureType or CTextureRef</param>
/// <param name="action"></param>
/// <param name="data">Texture data as a bitmap</param>
public STextureQueue(object textureOrRef, EQueueAction action, Bitmap data)
public STextureQueue(object textureOrRef, EQueueAction action, SKBitmap data)
{
TextureOrRef = textureOrRef;
Action = action;
@@ -280,9 +280,9 @@ namespace Vocaluxe.Lib.Draw
/// </summary>
/// <param name="texture"></param>
/// <param name="bmp"></param>
private void _WriteBitmapToTexture(ref TTextureType texture, Bitmap bmp)
private void _WriteBitmapToTexture(ref TTextureType texture, SKBitmap bmp)
{
Bitmap bmp2 = null;
SKBitmap bmp2 = null;
try
{
var size = _GetNewTextureSize(bmp.GetSize());
@@ -293,7 +293,7 @@ namespace Vocaluxe.Lib.Draw
}
//Fill the new Bitmap with the texture data
var bmpData = bmp.LockBits(bmp.GetRect(), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
var bmpData = bmp.ToBgra();
if (texture == null)
{
texture = _CreateTexture(size);
@@ -303,8 +303,11 @@ namespace Vocaluxe.Lib.Draw
texture.DataSize = size;
}
_WriteDataToTexture(texture, bmpData.Scan0);
bmp.UnlockBits(bmpData);
_WriteDataToTexture(texture, bmpData.GetPixels());
if (bmpData != bmp)
{
bmpData.Dispose();
}
}
finally
{
@@ -506,7 +509,7 @@ namespace Vocaluxe.Lib.Draw
Debug.Assert(!oldTexture.IsLoaded);
if (oldTexture.RefCount <= 0)
{
var bmp = q.Data as Bitmap;
var bmp = q.Data as SKBitmap;
if (bmp != null)
{
bmp.Dispose();
@@ -517,9 +520,9 @@ namespace Vocaluxe.Lib.Draw
TTextureType texture = null;
// ReSharper disable CanBeReplacedWithTryCastAndCheckForNull
if (q.Data is Bitmap)
if (q.Data is SKBitmap)
{
var bmp = (Bitmap)q.Data;
var bmp = (SKBitmap)q.Data;
_WriteBitmapToTexture(ref texture, bmp);
bmp.Dispose();
}
@@ -541,7 +544,7 @@ namespace Vocaluxe.Lib.Draw
Debug.Assert(textureRef != null, "Queued type is wrong");
if (!_Textures.ContainsKey(textureRef.Id))
{
var bmp = q.Data as Bitmap;
var bmp = q.Data as SKBitmap;
if (bmp != null)
{
bmp.Dispose();
@@ -553,9 +556,9 @@ namespace Vocaluxe.Lib.Draw
if (q.Action == EQueueAction.Update)
{
// ReSharper disable CanBeReplacedWithTryCastAndCheckForNull
if (q.Data is Bitmap)
if (q.Data is SKBitmap)
{
var bmp = (Bitmap)q.Data;
var bmp = (SKBitmap)q.Data;
UpdateTexture(textureRef, bmp);
bmp.Dispose();
}
@@ -618,7 +621,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="bmp"></param>
/// <param name="action"></param>
/// <param name="asyncResize">True if resizing should be done in an extra thread</param>
private void _EnqueueTextureAddOrUpdate(Object texture, Bitmap bmp, EQueueAction action, bool asyncResize)
private void _EnqueueTextureAddOrUpdate(Object texture, SKBitmap bmp, EQueueAction action, bool asyncResize)
{
Debug.Assert(action == EQueueAction.Add || action == EQueueAction.Update);
Debug.Assert(action != EQueueAction.Add || texture is TTextureType);
@@ -649,9 +652,9 @@ namespace Vocaluxe.Lib.Draw
/// <param name="texture"></param>
/// <param name="bmp"></param>
/// <param name="action"></param>
private void _ResizeTextureAndEnqueue(object texture, Bitmap bmp, EQueueAction action)
private void _ResizeTextureAndEnqueue(object texture, SKBitmap bmp, EQueueAction action)
{
var bmp2 = bmp.Resize(_GetNewTextureSize(bmp.Size));
var bmp2 = bmp.Resize(_GetNewTextureSize(bmp.GetSize()));
bmp.Dispose();
lock (_TextureQueue)
{
@@ -750,7 +753,7 @@ namespace Vocaluxe.Lib.Draw
return textureRef;
}
public CTextureRef AddTexture(Bitmap bmp)
public CTextureRef AddTexture(SKBitmap bmp)
{
_EnsureMainThread();
return AddTexture(bmp, null);
@@ -762,7 +765,7 @@ namespace Vocaluxe.Lib.Draw
/// <param name="bmp">The Bitmap of which the texure will be created from</param>
/// <param name="texturePath"></param>
/// <returns>A reference to the texture</returns>
public CTextureRef AddTexture(Bitmap bmp, string texturePath)
public CTextureRef AddTexture(SKBitmap bmp, string texturePath)
{
_EnsureMainThread();
if (bmp.Height == 0 || bmp.Width == 0)
@@ -817,7 +820,7 @@ namespace Vocaluxe.Lib.Draw
}
}
public CTextureRef EnqueueTexture(Bitmap bmp)
public CTextureRef EnqueueTexture(SKBitmap bmp)
{
var texture = _CreateTexture(new Size(-1, -1));
var textureRef = _GetTextureReference(bmp.GetSize(), texture);
@@ -882,7 +885,7 @@ namespace Vocaluxe.Lib.Draw
return textureRef;
}
public void EnqueueTextureUpdate(CTextureRef textureRef, Bitmap bmp)
public void EnqueueTextureUpdate(CTextureRef textureRef, SKBitmap bmp)
{
_EnqueueTextureAddOrUpdate(textureRef, bmp, EQueueAction.Update, true);
}
@@ -923,7 +926,7 @@ namespace Vocaluxe.Lib.Draw
}
}
public void UpdateTexture(CTextureRef textureRef, Bitmap bmp)
public void UpdateTexture(CTextureRef textureRef, SKBitmap bmp)
{
_EnsureMainThread();
TTextureType texture;
@@ -932,7 +935,7 @@ namespace Vocaluxe.Lib.Draw
return;
}
var reuseTexture = _IsTextureUsable(texture, bmp.Size);
var reuseTexture = _IsTextureUsable(texture, bmp.GetSize());
if (reuseTexture && texture.RefCount == 1)
{
_WriteBitmapToTexture(ref texture, bmp);
@@ -947,6 +950,37 @@ namespace Vocaluxe.Lib.Draw
}
}
public virtual bool SupportsYuvVideo
{
get { return false; }
}
protected virtual void _WriteYuvDataToTexture(TTextureType texture, byte[] data, float[] yuvToRgbRows)
{
throw new NotSupportedException();
}
public void UpdateYuvTexture(ref CTextureRef textureRef, int w, int h, byte[] data, float[] yuvToRgbRows)
{
_EnsureMainThread();
var size = new Size(w, h);
TTextureType texture;
if (_GetTexture(textureRef, out texture) && texture.DataSize.Equals(size) && texture.Size.Equals(size))
{
_WriteYuvDataToTexture(texture, data, yuvToRgbRows);
return;
}
if (textureRef != null)
{
RemoveTexture(ref textureRef);
}
texture = _CreateTexture(size);
_WriteYuvDataToTexture(texture, data, yuvToRgbRows);
textureRef = _GetTextureReference(size, texture);
}
public CTextureRef CopyTexture(CTextureRef textureRef)
{
// Lock to make sure the texture is not disposed while we are in this method
+7 -4
View File
@@ -16,6 +16,7 @@
#endregion
using System.Drawing;
using SkiaSharp;
using VocaluxeLib;
using VocaluxeLib.Draw;
@@ -37,15 +38,17 @@ namespace Vocaluxe.Lib.Draw
void MakeScreenShot();
CTextureRef AddTexture(string texturePath);
CTextureRef AddTexture(Bitmap bitmap);
CTextureRef AddTexture(SKBitmap bitmap);
CTextureRef AddTexture(int w, int h, byte[] data);
void UpdateTexture(CTextureRef texture, Bitmap bmp);
void UpdateTexture(CTextureRef texture, SKBitmap bmp);
void UpdateTexture(CTextureRef texture, int w, int h, byte[] data);
CTextureRef EnqueueTexture(string texturePath);
CTextureRef EnqueueTexture(Bitmap bmp);
CTextureRef EnqueueTexture(SKBitmap bmp);
CTextureRef EnqueueTexture(int w, int h, byte[] data);
void EnqueueTextureUpdate(CTextureRef textureRef, Bitmap bmp);
void EnqueueTextureUpdate(CTextureRef textureRef, SKBitmap bmp);
CTextureRef CopyTexture(CTextureRef textureRef);
bool SupportsYuvVideo { get; }
void UpdateYuvTexture(ref CTextureRef textureRef, int w, int h, byte[] data, float[] yuvToRgbRows);
void RemoveTexture(ref CTextureRef texture);
// Basic Draw Methods
Loaded 100 of 176 files, more files were not shown because too many files have changed in this diff. Show more