Cleanup for the latest clang-format version.

This commit is contained in:
Ben Vanik 2015-12-03 19:52:02 -08:00
parent 249b952de9
commit 00240945fe
6 changed files with 32 additions and 36 deletions

View File

@ -10,10 +10,9 @@
#include "xenia/apu/xaudio2/xaudio2_audio_driver.h"
// Must be included before xaudio2.h so we get the right windows.h include.
// clang-format off
#include "xenia/base/platform_win.h"
#include <xaudio2.h> // NOLINT(build/include_order)
// clang-format on
#include "xenia/apu/apu_flags.h"
#include "xenia/base/clock.h"

View File

@ -30,22 +30,22 @@ bool PathExists(const std::wstring& path);
// This can be used to ensure the destination path for a new file exists before
// attempting to create it.
bool CreateParentFolder(const std::wstring& path);
// Creates a folder at the specified path.
// Returns true if the path was created.
bool CreateFolder(const std::wstring& path);
// Recursively deletes the files and folders at the specified path.
// Returns true if the path was found and removed.
bool DeleteFolder(const std::wstring& path);
// Returns true if the given path exists and is a folder.
bool IsFolder(const std::wstring& path);
// Opens the file at the given path with the specified mode.
// This behaves like fopen and the returned handle can be used with stdio.
FILE* OpenFile(const std::wstring& path, const char* mode);
// Deletes the file at the given path.
// Returns true if the file was found and removed.
bool DeleteFile(const std::wstring& path);

View File

@ -13,14 +13,12 @@
#include <thread>
#include "xenia/base/logging.h"
#include "xenia/base/platform_win.h"
// winsock includes must come after platform_win.h:
// clang-format off
#include "xenia/base/platform_win.h"
#include <mstcpip.h> // NOLINT(build/include_order)
#include <winsock2.h> // NOLINT(build/include_order)
#include <ws2tcpip.h> // NOLINT(build/include_order)
// clang-format on
namespace xe {

View File

@ -65,15 +65,15 @@ class Emulator {
// Virtualized processor that can execute PPC code.
cpu::Processor* processor() const { return processor_.get(); }
// Audio hardware emulation for decoding and playback.
apu::AudioSystem* audio_system() const { return audio_system_.get(); }
// GPU emulation for command list processing.
gpu::GraphicsSystem* graphics_system() const {
return graphics_system_.get();
}
// Human-interface Device (HID) adapters for controllers.
hid::InputSystem* input_system() const { return input_system_.get(); }
@ -81,7 +81,7 @@ class Emulator {
cpu::ExportResolver* export_resolver() const {
return export_resolver_.get();
}
// File systems mapped to disc images, folders, etc for games and save data.
vfs::VirtualFileSystem* file_system() const { return file_system_.get(); }
@ -107,14 +107,14 @@ class Emulator {
// This will attempt to infer the type of the given file (such as an iso, etc)
// using heuristics.
X_STATUS LaunchPath(std::wstring path);
// Launches a game from a .xex file by mounting the containing folder as if it
// was an extracted STFS container.
X_STATUS LaunchXexFile(std::wstring path);
// Launches a game from a disc image file (.iso, etc).
X_STATUS LaunchDiscImage(std::wstring path);
// Launches a game from an STFS container file.
X_STATUS LaunchStfsContainer(std::wstring path);

View File

@ -10,10 +10,9 @@
#include "xenia/hid/xinput/xinput_input_driver.h"
// Must be included before xinput.h to avoid windows.h conflicts:
// clang-format off
#include "xenia/base/platform_win.h"
#include <xinput.h> // NOLINT(build/include_order)
// clang-format on
#include "xenia/hid/hid_flags.h"

View File

@ -103,14 +103,14 @@ class BaseHeap {
virtual bool Alloc(uint32_t size, uint32_t alignment,
uint32_t allocation_type, uint32_t protect, bool top_down,
uint32_t* out_address);
// Allocates pages at the given address.
// This can reserve and commit the pages as well as set protection modes.
// This will fail if the pages are already allocated.
virtual bool AllocFixed(uint32_t base_address, uint32_t size,
uint32_t alignment, uint32_t allocation_type,
uint32_t protect);
// Allocates pages at an address within the given address range.
// This can reserve and commit the pages as well as set protection modes.
// This will fail if not enough contiguous pages can be found.
@ -118,28 +118,28 @@ class BaseHeap {
uint32_t size, uint32_t alignment,
uint32_t allocation_type, uint32_t protect,
bool top_down, uint32_t* out_address);
// Decommits pages in the given range.
// Partial overlapping pages will also be decommitted.
virtual bool Decommit(uint32_t address, uint32_t size);
// Decommits and releases pages in the given range.
// Partial overlapping pages will also be released.
virtual bool Release(uint32_t address, uint32_t* out_region_size = nullptr);
// Modifies the protection mode of pages within the given range.
virtual bool Protect(uint32_t address, uint32_t size, uint32_t protect);
// Queries information about the given region of pages.
bool QueryRegionInfo(uint32_t base_address, HeapAllocationInfo* out_info);
// Queries the size of the region containing the given address.
bool QuerySize(uint32_t address, uint32_t* out_size);
// Queries the current protection mode of the region containing the given
// address.
bool QueryProtect(uint32_t address, uint32_t* out_protect);
// Gets the physical address of a virtual address.
// This is only valid if the page is backed by a physical allocation.
uint32_t GetPhysicalAddress(uint32_t address);
@ -180,7 +180,7 @@ class PhysicalHeap : public BaseHeap {
public:
PhysicalHeap();
~PhysicalHeap() override;
// Initializes the heap properties and allocates the page table.
void Initialize(uint8_t* membase, uint32_t heap_base, uint32_t heap_size,
uint32_t page_size, VirtualHeap* parent_heap);
@ -232,7 +232,7 @@ class Memory {
// Base address of virtual memory in the host address space.
// This is often something like 0x100000000.
inline uint8_t* virtual_membase() const { return virtual_membase_; }
// Translates a guest virtual address to a host address that can be accessed
// as a normal pointer.
// Note that the contents at the specified host address are big-endian.
@ -247,7 +247,7 @@ class Memory {
// Base address of physical memory in the host address space.
// This is often something like 0x200000000.
inline uint8_t* physical_membase() const { return physical_membase_; }
// Translates a guest physical address to a host address that can be accessed
// as a normal pointer.
// Note that the contents at the specified host address are big-endian.
@ -259,16 +259,16 @@ class Memory {
return reinterpret_cast<T>(physical_membase_ +
(guest_address & 0x1FFFFFFF));
}
// Zeros out a range of memory at the given guest address.
void Zero(uint32_t address, uint32_t size);
// Fills a range of guest memory with the given byte value.
void Fill(uint32_t address, uint32_t size, uint8_t value);
// Copies a non-overlapping range of guest memory (like a memcpy).
void Copy(uint32_t dest, uint32_t src, uint32_t size);
// Searches the given range of guest memory for a run of dword values in
// big-endian order.
uint32_t SearchAligned(uint32_t start, uint32_t end, const uint32_t* values,
@ -280,7 +280,7 @@ class Memory {
uint32_t size, void* context,
cpu::MMIOReadCallback read_callback,
cpu::MMIOWriteCallback write_callback);
// Gets the defined MMIO range for the given virtual address, if any.
cpu::MMIORange* LookupVirtualMappedRange(uint32_t virtual_address);
@ -294,7 +294,7 @@ class Memory {
uintptr_t AddPhysicalWriteWatch(uint32_t physical_address, uint32_t length,
cpu::WriteWatchCallback callback,
void* callback_context, void* callback_data);
// Cancels a write watch requested with AddPhysicalWriteWatch.
void CancelWriteWatch(uintptr_t watch_handle);
@ -310,7 +310,7 @@ class Memory {
// Gets the heap for the address space containing the given address.
BaseHeap* LookupHeap(uint32_t address);
// Gets the heap with the given properties.
BaseHeap* LookupHeapByType(bool physical, uint32_t page_size);