Browse Source

commented some code

mikymod 12 years ago
parent
commit
7740f44a30
2 changed files with 9 additions and 7 deletions
  1. 2 0
      src/Device.cpp
  2. 7 7
      src/os/win/OsFile.cpp

+ 2 - 0
src/Device.cpp

@@ -526,6 +526,7 @@ void Device::check_preferred_settings()
 //-----------------------------------------------------------------------------
 void Device::read_engine_settings()
 {
+	/*
 	DiskFile* file = m_filesystem->open("crown.cfg", FOM_READ);
 	MallocAllocator allocator;
 	JSONParser json(allocator, file);
@@ -536,6 +537,7 @@ void Device::read_engine_settings()
 	json.get_root().get_number("width").to_int(width);
 	os::printf("value = %s\n", value);
 	os::printf("width = %d\n", width);
+	*/
 }
 
 

+ 7 - 7
src/os/win/OsFile.cpp

@@ -108,30 +108,30 @@ size_t OsFile::write(const void* data, size_t size)
 
 void OsFile::seek(size_t position)
 {
-	DWORD seek_result = SetFilePointer(m_file_handle, position, NULL, FILE_BEGIN);
+	BOOL seek_result = SetFilePointer(m_file_handle, position, NULL, FILE_BEGIN);
 
-	CE_ASSERT(seek_result != INVALID_SET_FILE_POINTER, "Failed to seek");
+	CE_ASSERT(seek_result, "Failed to seek");
 }
 
 void OsFile::seek_to_end()
 {
-	DWORD seek_result = SetFilePointer(m_file_handle, 0, NULL, FILE_END);
+	BOOL seek_result = SetFilePointer(m_file_handle, 0, NULL, FILE_END);
 
-	CE_ASSERT(seek_result != INVALID_SET_FILE_POINTER, "Failed to seek");
+	CE_ASSERT(seek_result, "Failed to seek");
 }
 
 void OsFile::skip(size_t bytes)
 {
-	DWORD seek_result = SetFilePointer(m_file_handle, bytes, NULL, FILE_CURRENT);
+	BOOL seek_result = SetFilePointer(m_file_handle, bytes, NULL, FILE_CURRENT);
 
-	CE_ASSERT(seek_result != INVALID_SET_FILE_POINTER, "Failed to seek");
+	CE_ASSERT(seek_result, "Failed to seek");
 }
 
 size_t OsFile::position() const
 {
 	DWORD position = SetFilePointer(m_file_handle, 0, NULL, FILE_CURRENT);
 	
-	CE_ASSERT(position != INVALID_SET_FILE_POINTER, "Failed to seek");
+	CE_ASSERT(position, "Failed to seek");
 
 	return position;
 }