Skip to content

Commit 4a58fd3

Browse files
committed
Fix source generators not running on linux
1 parent ad43ff2 commit 4a58fd3

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Directory.Build.targets‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<!-- Every [SourceDll] assembly links Usings/GlobalUsings.cs. Those get the ConVar/ConCommand registration generator,
33
which emits Source.Generated.CvarRegistration for EngineBuilder.ConVar_Register to use instead of reflection. -->
4-
<ItemGroup Condition="'@(Compile->WithMetadataValue('Identity', '..\Usings\GlobalUsings.cs'))' != ''">
4+
<ItemGroup Condition="'@(Compile->WithMetadataValue('Identity', '..\Usings\GlobalUsings.cs'))@(Compile->WithMetadataValue('Identity', '../Usings/GlobalUsings.cs'))' != ''">
55
<ProjectReference Include="$(MSBuildThisFileDirectory)Source.CodeAnalysis.ConVars\Source.CodeAnalysis.ConVars.csproj" PrivateAssets="all" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
66
<ProjectReference Include="$(MSBuildThisFileDirectory)Source.CodeAnalysis.VGUI\Source.CodeAnalysis.VGUI.csproj" PrivateAssets="all" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
77
</ItemGroup>

‎Source.GUI.Controls/Menu.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ public int GetItemCount() {
10221022
}
10231023

10241024
public int GetMenuID(int index) {
1025-
if (SortedItems[index] == -1)
1025+
if (index < 0 || index >= SortedItems.Count)
10261026
return -1;
10271027

10281028
return SortedItems[index];

‎Source.SDLManager/SDL3_Window.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public void PumpMessages() {
168168

169169
WindowEvent newEvent = new();
170170
newEvent.EventType = pressed ? WindowEventType.MouseButtonDown : WindowEventType.MouseButtonUp;
171-
newEvent.MousePos = new((int)(ev.motion.x * MouseXScale), (int)(ev.motion.x * MouseYScale));
171+
newEvent.MousePos = new((int)(ev.button.x * MouseXScale), (int)(ev.button.y * MouseYScale));
172172
newEvent.MouseButtonFlags = MouseButtons;
173173
newEvent.MouseClickCount = (uint)(doublePress ? 2 : 1);
174174
newEvent.MouseButton = evButton;

0 commit comments

Comments
 (0)