From b8b81001bd41fccde6380a5a5adf8890a120c0c5 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sat, 5 Mar 2011 02:32:09 +0000 Subject: [PATCH] Linux build fix. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7288 8ced0084-cf51-0410-be5f-012b33b47a6e --- CMakeLists.txt | 6 ++++++ Source/Core/VideoCommon/Src/TextureDecoder.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6367a4b64..0323f32525 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,12 @@ if(NOT OPENGL_GLU_FOUND) message(FATAL_ERROR "GLU is required but not found") endif() +include(FindOpenMP REQUIRED) +if(OPENMP_FOUND) + add_definitions(${OpenMP_CXX_FLAGS}) + set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}) +endif() + include(FindALSA OPTIONAL) if(ALSA_FOUND) add_definitions(-DHAVE_ALSA=1) diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index 99cf31106c..a04ef4ddcf 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -723,7 +723,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh #pragma omp parallel for for (int y = 0; y < height; y += 8) for (int x = 0, yStep = (y / 8) * Wsteps8; x < width; x += 8, yStep++) - for (int iy = 0, xStep = yStep * 8 ; iy < 8; iy++,yStep++) + for (int iy = 0; iy < 8; iy++,yStep++) for (int ix = 0; ix < 4; ix++) { int val = src[4 * yStep + ix];