mirror of
https://github.com/ApfelTeeSaft/azahar.git
synced 2026-08-26 19:23:31 +00:00
common: Add NATVIS to BitField class for better VS debugging (#1731)
This commit is contained in:
@@ -68,6 +68,7 @@ add_library(citra_common STATIC
|
||||
detached_tasks.cpp
|
||||
detached_tasks.h
|
||||
bit_field.h
|
||||
bit_field.natvis
|
||||
bit_set.h
|
||||
bounded_threadsafe_queue.h
|
||||
cityhash.cpp
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright Citra Emulator Project / Azahar Emulator Project -->
|
||||
<!-- Licensed under GPLv2 or any later version -->
|
||||
<!-- Refer to the license.txt file included. -->
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="BitField<*,*,*,*>">
|
||||
<DisplayString>
|
||||
{((unsigned long long)storage >> $T1) & (((unsigned long long)1 << $T2) - 1)}
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="UnsignedValue">
|
||||
((unsigned long long)storage >> $T1) & (((unsigned long long)1 << $T2) - 1)
|
||||
</Item>
|
||||
<Item Name="SignedValue">
|
||||
(long long)((((unsigned long long)storage >> $T1) & ((1ULL << $T2)-1)) & (1ULL << ($T2-1))
|
||||
? -((1ULL << $T2) - (((unsigned long long)storage >> $T1) & ((1ULL << $T2)-1)))
|
||||
: (((unsigned long long)storage >> $T1) & ((1ULL << $T2)-1)))
|
||||
</Item>
|
||||
<Item Name="Position">
|
||||
$T1
|
||||
</Item>
|
||||
<Item Name="Bits">
|
||||
$T2
|
||||
</Item>
|
||||
<Item Name="RawStorage">storage</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
||||
Reference in New Issue
Block a user