Fix MVSC builds

This commit is contained in:
Lorenzooone 2024-04-14 21:10:16 +02:00
parent 0827b69d7c
commit 6ac2720f9f
7 changed files with 19 additions and 4 deletions

1
.gitignore vendored Normal file → Executable file
View File

@ -1,5 +1,6 @@
# Byte-compiled / optimized / DLL files
*.o
openal32.dll
cc3dsfs
cc3dsfs.exe
*.conf

10
include/3dscapture.hpp Normal file → Executable file
View File

@ -24,19 +24,23 @@
#define FIX_PARTIAL_FIRST_FRAME_NUM 3
struct __attribute__ ((packed)) VideoInputData {
#pragma pack(push, 1)
struct PACKED VideoInputData {
uint8_t screen_data[IN_VIDEO_SIZE][3];
};
struct __attribute__ ((packed)) CaptureReceived {
struct PACKED CaptureReceived {
VideoInputData video_data;
uint16_t audio_data[MAX_SAMPLES_IN];
};
#pragma pack(pop)
struct CaptureData {
FT_HANDLE handle;
CaptureReceived capture_buf[NUM_CONCURRENT_DATA_BUFFERS];
uint32_t read[NUM_CONCURRENT_DATA_BUFFERS];
ULONG read[NUM_CONCURRENT_DATA_BUFFERS];
double time_in_buf[NUM_CONCURRENT_DATA_BUFFERS];
volatile int curr_in = 0;
volatile int cooldown_curr_in = FIX_PARTIAL_FIRST_FRAME_NUM;

0
include/audio.hpp Normal file → Executable file
View File

0
include/conversions.hpp Normal file → Executable file
View File

6
include/frontend.hpp Normal file → Executable file
View File

@ -31,10 +31,14 @@ struct DisplayData {
bool split;
};
struct __attribute__ ((packed)) VideoOutputData {
#pragma pack(push, 1)
struct PACKED VideoOutputData {
uint8_t screen_data[IN_VIDEO_SIZE][4];
};
#pragma pack(pop)
struct SFEvent {
SFEvent(sf::Event::EventType type, sf::Keyboard::Key code, uint32_t unicode) : type(type), code(code), unicode(unicode) {}

0
include/hw_defs.hpp Normal file → Executable file
View File

6
include/utils.hpp Normal file → Executable file
View File

@ -5,6 +5,12 @@
#include <condition_variable>
#include <chrono>
#if _MSC_VER && !__INTEL_COMPILER
#define PACKED
#else
#define PACKED __attribute__((packed))
#endif
#define NAME "cc3dsfs"
// This isn't precise, however we can use it...