Replacing includes of windows headers with base/platform.h.

This commit is contained in:
Ben Vanik 2015-07-01 09:02:04 -07:00
parent 88d01e8375
commit dec0d12cc9
23 changed files with 66 additions and 54 deletions

View File

@ -397,6 +397,7 @@
<ClInclude Include="src\xenia\ui\file_picker.h" />
<ClInclude Include="src\xenia\ui\gl\blitter.h" />
<ClInclude Include="src\xenia\ui\gl\circular_buffer.h" />
<ClInclude Include="src\xenia\ui\gl\gl.h" />
<ClInclude Include="src\xenia\ui\gl\gl_context.h" />
<ClInclude Include="src\xenia\ui\gl\gl_profiler_display.h" />
<ClInclude Include="src\xenia\ui\gl\wgl_control.h" />

View File

@ -1371,6 +1371,9 @@
<ClInclude Include="src\xenia\ui\platform.h">
<Filter>src\xenia\ui</Filter>
</ClInclude>
<ClInclude Include="src\xenia\ui\gl\gl.h">
<Filter>src\xenia\ui\gl</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="src\xenia\cpu\hir\opcodes.inl">

View File

@ -9,6 +9,8 @@
#include "xenia/apu/xaudio2/xaudio2_audio_driver.h"
#include <xaudio2.h>
#include "xenia/apu/apu_flags.h"
#include "xenia/base/clock.h"
#include "xenia/base/logging.h"
@ -39,13 +41,16 @@ class XAudio2AudioDriver::VoiceCallback : public IXAudio2VoiceCallback {
};
XAudio2AudioDriver::XAudio2AudioDriver(Emulator* emulator, HANDLE semaphore)
: audio_(nullptr),
: AudioDriver(emulator),
audio_(nullptr),
mastering_voice_(nullptr),
pcm_voice_(nullptr),
semaphore_(semaphore),
voice_callback_(nullptr),
current_frame_(0),
AudioDriver(emulator) {}
current_frame_(0) {
static_assert(frame_count_ == XAUDIO2_MAX_QUEUED_BUFFERS,
"xaudio header differs");
}
XAudio2AudioDriver::~XAudio2AudioDriver() = default;

View File

@ -10,10 +10,12 @@
#ifndef XENIA_APU_XAUDIO2_XAUDIO2_AUDIO_DRIVER_H_
#define XENIA_APU_XAUDIO2_XAUDIO2_AUDIO_DRIVER_H_
#include <xaudio2.h>
#include "xenia/apu/audio_driver.h"
struct IXAudio2;
struct IXAudio2MasteringVoice;
struct IXAudio2SourceVoice;
namespace xe {
namespace apu {
namespace xaudio2 {
@ -36,7 +38,7 @@ class XAudio2AudioDriver : public AudioDriver {
class VoiceCallback;
VoiceCallback* voice_callback_;
static const uint32_t frame_count_ = XAUDIO2_MAX_QUEUED_BUFFERS;
static const uint32_t frame_count_ = 64;
static const uint32_t frame_channels_ = 6;
static const uint32_t channel_samples_ = 256;
static const uint32_t frame_samples_ = frame_channels_ * channel_samples_;

View File

@ -8,9 +8,9 @@
*/
#include "xenia/base/debugging.h"
#include "xenia/base/string_buffer.h"
#include <Windows.h>
#include "xenia/base/platform.h"
#include "xenia/base/string_buffer.h"
namespace xe {
namespace debugging {

View File

@ -9,8 +9,6 @@
#include "xenia/base/filesystem.h"
#include <shellapi.h>
#include <string>
#include "xenia/base/platform.h"

View File

@ -10,10 +10,9 @@
#include "xenia/base/main.h"
#include <fcntl.h>
#include <io.h>
#include <shellapi.h>
#include <gflags/gflags.h>
#include <io.h>
#include "xenia/base/string.h"
namespace xe {

View File

@ -9,14 +9,13 @@
#include "xenia/base/mapped_memory.h"
#include <Windows.h>
#include <memory>
#include <mutex>
#include <vector>
#include "xenia/base/logging.h"
#include "xenia/base/math.h"
#include "xenia/base/platform.h"
namespace xe {

View File

@ -45,11 +45,16 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#define NOMINMAX
#include <SDKDDKVer.h>
#include <windows.h>
#include <ObjBase.h>
#undef min
#undef max
#include <shellapi.h>
#include <shlwapi.h>
#include <shobjidl.h>
#include <dwmapi.h>
#include <tpcshrd.h>
#include <windowsx.h>
#define strdup _strdup
#define strcasecmp _stricmp
#define strncasecmp _strnicmp

View File

@ -9,8 +9,6 @@
#include "xenia/base/platform.h"
#include <shellapi.h>
namespace xe {
void LaunchBrowser(const char* url) {

View File

@ -15,7 +15,6 @@
#include "xenia/cpu/backend/x64/x64_sequences.h"
#include "xenia/cpu/backend/x64/x64_stack_layout.h"
#include "xenia/cpu/processor.h"
#include "third_party/xbyak/xbyak/xbyak_util.h"
DEFINE_bool(
enable_haswell_instructions, true,

View File

@ -10,9 +10,6 @@
#ifndef XENIA_BACKEND_X64_X64_EMITTER_H_
#define XENIA_BACKEND_X64_X64_EMITTER_H_
#include "third_party/xbyak/xbyak/xbyak.h"
#include "third_party/xbyak/xbyak/xbyak_util.h"
#include "xenia/base/arena.h"
#include "xenia/cpu/hir/hir_builder.h"
#include "xenia/cpu/hir/instr.h"
@ -20,6 +17,10 @@
#include "xenia/debug/function_trace_data.h"
#include "xenia/memory.h"
// NOTE: must be included last as it expects windows.h to already be included.
#include "third_party/xbyak/xbyak/xbyak.h"
#include "third_party/xbyak/xbyak/xbyak_util.h"
namespace xe {
namespace cpu {
class DebugInfo;

View File

@ -9,8 +9,7 @@
#include "xenia/cpu/mmio_handler.h"
#include <Windows.h>
#include "xenia/base/platform.h"
#include "xenia/profiling.h"
namespace xe {

View File

@ -7,9 +7,6 @@
******************************************************************************
*/
#define _WINSOCK_DEPRECATED_NO_WARNINGS // inet_addr
#include <winsock2.h>
#include <cstring>
#include "xenia/base/clock.h"
@ -20,6 +17,10 @@
#include "xenia/kernel/xam_private.h"
#include "xenia/xbox.h"
// NOTE: must be included last as it expects windows.h to already be included.
#define _WINSOCK_DEPRECATED_NO_WARNINGS // inet_addr
#include <winsock2.h>
namespace xe {
namespace kernel {

View File

@ -12,8 +12,7 @@
#include <memory>
#include "third_party/GL/glew.h"
#include "third_party/GL/wglew.h"
#include "xenia/ui/gl/gl.h"
namespace xe {
namespace ui {

View File

@ -12,7 +12,7 @@
#include <unordered_map>
#include "xenia/ui/gl/gl_context.h"
#include "xenia/ui/gl/gl.h"
namespace xe {
namespace ui {

21
src/xenia/ui/gl/gl.h Normal file
View File

@ -0,0 +1,21 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2015 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_UI_GL_GL_H_
#define XENIA_UI_GL_GL_H_
#include "xenia/base/platform.h"
#include "third_party/GL/glew.h"
#include "third_party/GL/wglew.h"
extern "C" GLEWContext* glewGetContext();
extern "C" WGLEWContext* wglewGetContext();
#endif // XENIA_UI_GL_GL_H_

View File

@ -14,15 +14,11 @@
#include <memory>
#include "third_party/GL/glew.h"
#include "third_party/GL/wglew.h"
#include "xenia/ui/gl/blitter.h"
#include "xenia/ui/gl/gl.h"
DECLARE_bool(thread_safe_gl);
extern "C" GLEWContext* glewGetContext();
extern "C" WGLEWContext* wglewGetContext();
namespace xe {
namespace ui {
namespace gl {

View File

@ -10,9 +10,7 @@
#ifndef XENIA_UI_WIN32_WIN32_CONTROL_H_
#define XENIA_UI_WIN32_WIN32_CONTROL_H_
#include <windows.h>
#include <windowsx.h>
#include "xenia/base/platform.h"
#include "xenia/ui/control.h"
namespace xe {

View File

@ -9,12 +9,7 @@
#include "xenia/ui/win32/win32_file_picker.h"
#include <windows.h>
#include <windowsx.h>
#include <shellapi.h>
#include <shlwapi.h>
#include <shobjidl.h>
#include "xenia/base/platform.h"
#include "xenia/base/assert.h"
namespace xe {

View File

@ -10,14 +10,12 @@
#ifndef XENIA_UI_WIN32_WIN32_LOOP_H_
#define XENIA_UI_WIN32_WIN32_LOOP_H_
#include <windows.h>
#include <windowsx.h>
#include <atomic>
#include <condition_variable>
#include <mutex>
#include <thread>
#include "xenia/base/platform.h"
#include "xenia/base/threading.h"
#include "xenia/ui/loop.h"

View File

@ -10,9 +10,7 @@
#ifndef XENIA_UI_WIN32_WIN32_MENU_ITEM_H_
#define XENIA_UI_WIN32_WIN32_MENU_ITEM_H_
#include <windows.h>
#include <windowsx.h>
#include "xenia/base/platform.h"
#include "xenia/ui/menu_item.h"
namespace xe {

View File

@ -10,9 +10,6 @@
#include "xenia/ui/win32/win32_window.h"
#include <cstring>
#include <dwmapi.h>
#include <tpcshrd.h>
#include <windowsx.h>
#include "xenia/base/logging.h"